Fix #20004 - generate DW_TAG_enumerator for enum members in DWARF deb…#22864
Fix #20004 - generate DW_TAG_enumerator for enum members in DWARF deb…#22864dkorpel wants to merge 1 commit intodlang:masterfrom
Conversation
|
Thanks for your pull request and interest in making D better, @dkorpel! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.
|
4194317 to
cf52fdb
Compare
|
The backend currently assumes |
|
@dkorpel dwarf supports this (enum class) |
|
From the dwarfv5 spec (rewrote example as D) enum E : byte { E1 , E2 = 100 } |
|
Named enums in D are all strongly typed, so |
|
The dwarf debug info generation works with the current changes, but the change from |
cf52fdb to
debf6f0
Compare
…F debug info For D enums, the backend's SEenumlist was never populated and SENforward was never cleared, causing all enum types to appear as forward-referenced declarations with no children in DWARF output. Changes: - In visitEnum, use type_enum for all integral base types (not just int), and populate SEenumlist with member names and values when debug info is enabled. This allows GDB to show symbolic enum names. - In type_size, make TYenum delegate to its Tnext (base type) for the size. Previously TYenum was hardcoded as LONGSIZE (4 bytes), which caused incorrect parameter passing for e.g. ulong or ubyte enums. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
debf6f0 to
aac5d88
Compare
…ug info
Closes #20004