Debugging LDC executables

Timo Gransch timo.gransch at web.de
Mon Jun 1 08:31:24 PDT 2009


Christian Kamm schrieb:

> Well, that's what you would expect if you step into that line. Use 'next' to 
> step over the runtime function calls hidden in that line.

Is it really intended that gdb tries to step into runtime functions
which have no debug information if I use 'step'? As you might have
realized, I'm not an expert in using the gdb command line (I prefer to
debug from my IDE), but if I run gdb on a C program compiled with gcc,
'step' stops at the lowest level of my own code.

The result is the same if I use 'next':

(gdb) break test.d:5
Breakpoint 1 at 0x401e69: file test.d, line 5.
(gdb) run
Starting program: /home/timo/tmp/testd/test
[Thread debugging using libthread_db enabled]
[New Thread 0x7fe5e63146f0 (LWP 27517)]
[Switching to Thread 0x7fe5e63146f0 (LWP 27517)]

Breakpoint 1, D main (args={"/home/timo/tmp/testd/test"}) at test.d:5
5	    for (int i = 0; i < args.length; i++)
Current language:  auto; currently d
(gdb) next
7	        Cout(args[i] ~ "\n");
(gdb) next
0x00000000004052e0 in _d_newarrayvT ()
Current language:  auto; currently asm
(gdb) next
Single stepping until exit from function _d_newarrayvT,
which has no line number information.
0x0000000000409ef0 in typeinfo.ti_Ag.TypeInfo_Aa.next() ()
(gdb) next
Single stepping until exit from function
_D8typeinfo5ti_Ag11TypeInfo_Aa4nextMFZC8TypeInfo,
which has no line number information.
0x00000000004052f4 in _d_newarrayvT ()

Best regards,
Timo


More information about the Digitalmars-d-debugger mailing list