[Issue 20348] New: [Reg 2.089.0-rc.1] Bad debug info for enum forward references

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Nov 2 10:16:20 UTC 2019


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

          Issue ID: 20348
           Summary: [Reg 2.089.0-rc.1] Bad debug info for enum forward
                    references
           Product: D
           Version: D2
          Hardware: All
                OS: Windows
            Status: NEW
          Keywords: symdeb
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: r.sagitario at gmx.de

module endbg;

enum EnumTest
{
    E1, E2, E3
}

void main()
{
    EnumTest e1 = EnumTest.E1;
    EnumTest e2 = EnumTest.E2;
}

Compiling this with "dmd -m64 -g endbg.d" and dumping it with cvdump yields:

...
0x1006 : Length = 29, Leaf = 0x1507 LF_ENUM
        # members = 0,  type = T_INT4(0074) field list type 0x0000
FORWARD REF,    enum name = endbg.EnumTest

0x1007 : Length = 29, Leaf = 0x1507 LF_ENUM
        # members = 0,  type = T_INT4(0074) field list type 0x0000
FORWARD REF,    enum name = endbg.EnumTest
...

i.e. the forward reference is emitted multiple times and has an odd length
(which can cause the debugger to crash).

--


More information about the Digitalmars-d-bugs mailing list