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
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/db9a6371b6b3b921b67d3c896b8dd57dbac8e31d fix issue 17367 - force proper alignment for elements in an enumerator field list https://github.com/dlang/dmd/commit/bdec3b3dcc0024ee9fd685655b62b96d3b80c3a9 Merge pull request #6741 from rainers/issue_17367 fix issue 17367 - CodeView/MSCOFF: bad debug information for enumerators
Comment #2 by github-bugzilla — 2017-06-17T11:34:13Z
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/db9a6371b6b3b921b67d3c896b8dd57dbac8e31d fix issue 17367 - force proper alignment for elements in an enumerator field list https://github.com/dlang/dmd/commit/bdec3b3dcc0024ee9fd685655b62b96d3b80c3a9 Merge pull request #6741 from rainers/issue_17367
Comment #3 by github-bugzilla — 2017-08-07T13:16:01Z
Commits pushed to newCTFE at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/db9a6371b6b3b921b67d3c896b8dd57dbac8e31d fix issue 17367 - force proper alignment for elements in an enumerator field list https://github.com/dlang/dmd/commit/bdec3b3dcc0024ee9fd685655b62b96d3b80c3a9 Merge pull request #6741 from rainers/issue_17367