Bug 17367 – CodeView/MSCOFF: bad debug information for enumerators
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2017-05-03T10:23:00Z
Last change time
2017-08-07T13:16:01Z
Keywords
symdeb
Assigned to
nobody
Creator
r.sagitario
Comments
Comment #0 by r.sagitario — 2017-05-03T10:23:40Z
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.
Comment #1 by github-bugzilla — 2017-05-10T05:56:30Z