Bug 1455 – gdb: DMD does not generate debug info for class and struct members

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2007-08-30T01:41:00Z
Last change time
2014-02-14T20:35:46Z
Keywords
wrong-code
Assigned to
nobody
Creator
cristian

Comments

Comment #0 by cristian — 2007-08-30T01:41:20Z
Compile the program below with dmd -debug -g, and step inside Bobo::coco and Foo::coco respectively, using either GDB or ZeroBUGS. The struct / classes are shown as opaque (GDC generates the correct information). import std.stdio; struct Bobo { int a; void coco() { writefln("Bobo::coco"); a += 1; } }; class Foo { int a; void coco() { writefln("Foo::coco"); a += 1; } }; void main() { Bobo b; b.coco(); Foo i = new Foo; i.coco(); }
Comment #1 by leandro.lucarella — 2009-10-12T14:23:52Z
I can confirm this is still present in DMD 2.034 (DMD 1.049 works fine), at least using GDB 7.0 (with D patches) and -gc compiler flag (-g is known to be broken when using GDB).
Comment #2 by leandro.lucarella — 2009-10-12T16:33:32Z
Woops, forgot the -gc flag. The test can't be explored because of the bug 1079, but removing the "import std.stdio" and the calls to writefln() I can see the struct Bobo and class Foo members without any problems, so I'm closing this bug.