What's the proper way to debug D programs with GDB?

Robert Clipsham robert at octarineparrot.com
Mon Mar 29 15:40:51 PDT 2010


On 17/03/10 22:50, Walter Bright wrote:
> grauzone wrote:
>> dmd producing buggy debugging information seems to be an old problem:
>> http://d.puremagic.com/issues/show_bug.cgi?id=1079
>
> The problem is that dmd produces dwarf debug info according to the dwarf
> spec. When gdb fails, I have no clue why, and nobody has ever been able
> to figure out just *what* in the dwarf info is causing gdb to fail.
>
> Some problems were identified a few months back, and those were fixed
> (evidently gdb cannot handle module records, and gdb also relied on some
> undocumented stuff).
>
> If anyone wants to peruse the gdb source and figure out exactly *what*
> it is choking on, that would be most appreciated.

Done. I've attached a patch to 
http://d.puremagic.com/issues/show_bug.cgi?id=3987 which seems to fix 
the issue. The problem was incorrect debug information being created for 
function pointers, it seems there shouldn't be a type for both the 
function and the pointer to it.


More information about the Digitalmars-d-debugger mailing list