digitalmars.D - Possible malformed DWARF debug object files.
- Steve Teale (13/13) Jul 23 2011 Before I waste time trying to find a minimal example of this, let me ask...
- Robert Clipsham (15/28) Jul 23 2011 I assume you mean gdb here.
Before I waste time trying to find a minimal example of this, let me ask if
anyone has seen similar behavior. The problems I've seen arise when using gtkD.
DMD(2) Linux X386 compiled with -g appears to produce flawed object files.
Either on starting GDB or when I try to set a breakpoint, I get:
Die: DW_TAG_type_unit (abbrev 4, offset 0x5b)
parent at offset: 0xb
has children: FALSE
attributes:
DW_AT_byte_size (DW_FORM_data1) constant: 8
DW_AT_type (DW_FORM_ref4) constant ref: 0x53 (adjusted)
Dwarf Error: Missing children for type unit [in module /home/steve/tredit/tree]
It occurs to me to wonder if 'unit' is actually 'uint'.
If you use -gc it works, but then debugging with GDC is very flaky.
Jul 23 2011
On 23/07/2011 17:48, Steve Teale wrote:
Before I waste time trying to find a minimal example of this, let me ask if
anyone has seen similar behavior. The problems I've seen arise when using gtkD.
DMD(2) Linux X386 compiled with -g appears to produce flawed object files.
Either on starting GDB or when I try to set a breakpoint, I get:
Die: DW_TAG_type_unit (abbrev 4, offset 0x5b)
parent at offset: 0xb
has children: FALSE
attributes:
DW_AT_byte_size (DW_FORM_data1) constant: 8
DW_AT_type (DW_FORM_ref4) constant ref: 0x53 (adjusted)
Dwarf Error: Missing children for type unit [in module /home/steve/tredit/tree]
It occurs to me to wonder if 'unit' is actually 'uint'.
If you use -gc it works, but then debugging with GDC is very flaky.
I assume you mean gdb here.
The -g switch isn't meant to work on linux - gdb doesn't support D's
extensions to DWARF, nor will it ever, as they conflict with certain
parts of DWARF 4. You should compile with -gc if you are using anything
but windows.
There are several ways this situation could be fixed, which have been
discussed, but someone needs to take on the task of actually
implementing it. I was going to do it when I was busy making debug info
actually work (there was a time not too long ago where anything that
used phobos didn't produce working debug info), but unforunately I ran
out of time.
--
Robert
http://octarineparrot.com/
Jul 23 2011








Robert Clipsham <robert octarineparrot.com>