www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22492] New: DWARF: DW_TAG_enumerator is not being generated

https://issues.dlang.org/show_bug.cgi?id=22492

          Issue ID: 22492
           Summary: DWARF: DW_TAG_enumerator is not being generated for
                    enum members
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: contact lsferreira.net

Currently there is no debug information about the members of an enum:

```
0x0000018c:   DW_TAG_enumeration_type
                DW_AT_name      ("types.ABC")
                DW_AT_declaration       (0x01)
```

Expected result:

```
0x0000002f:     DW_TAG_enumeration_type
                  DW_AT_name    ("ABC")
                  ...

0x0000003c:       DW_TAG_enumerator
                    DW_AT_name  ("A")
                    DW_AT_const_value   (0)

0x00000042:       DW_TAG_enumerator
                    DW_AT_name  ("B")
                    DW_AT_const_value   (1)

0x00000048:       DW_TAG_enumerator
                    DW_AT_name  ("C")
                    DW_AT_const_value   (2)
```

--
Nov 08 2021