[Issue 17367] New: CodeView/MSCOFF: bad debug information for enumerators

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed May 3 03:23:40 PDT 2017


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

          Issue ID: 17367
           Summary: CodeView/MSCOFF: bad debug information for enumerators
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Keywords: symdeb
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: r.sagitario at gmx.de

Compile:

module test;
enum E
{
    one,
    two
}

with "dmd -m64 -g -c test.d"

and analyze it with cvdump from
https://github.com/Microsoft/microsoft-pdb/tree/master/cvdump:

...
*** TYPES

0x1000 : Length = 22, Leaf = 0x1507 LF_ENUM
        # members = 2,  type = T_INT4(0074) field list type 0x1001
        enum name = test.E

0x1001 : Length = 22, Leaf = 0x1203 LF_FIELDLIST
        list[0] = LF_ENUMERATE, none, value = 0, name = 'one'
Error : Leaf is not aligned on a 4 byte boundary
        list[1] = LF_ENUMERATE, none, value = 1, name = 'two'

0x1002 : Length = 42, Leaf = 0x1504 LF_CLASS
        # members = 0,  field list type 0x0000, FORWARD REF,
        Derivation list type 0x0000, VT shape type 0x0000
        Size = 0, class name = object.TypeInfo_Enum


Note the reported misalignment which can cause debuggers to get really
confused.

--


More information about the Digitalmars-d-bugs mailing list