[Lazarus] Stacktrace using Dwarf vs Stabs (maybe an RTFM question).

Bart bartjunk64 at gmail.com
Tue Jan 13 13:56:40 CET 2015


On 1/13/15, Martin Frb <lazarus at mfriebe.de> wrote:

> This is with -gl ?

> IN this case it is an fpc question, as this stacktrace is not done by
> the debugger, but by your app itself.
>
> This is implemented in the units lineinfo and infodwarf (or similar).
> Both part of fpc.

OK, I see.

When running in gdb the output in fact is similar for stabs and dwarf:
Program received signal SIGFPE, Arithmetic exception.
0x00428fcd in PROC10 () at main.pp:480
480       writeln(X div Y);
(gdb) bt
#0  0x00428fcd in PROC10 () at main.pp:480
#1  0x00429028 in PROC9 () at main.pp:485
#2  0x00429038 in PROC8 () at main.pp:490
#3  0x00429048 in PROC7 () at main.pp:495
#4  0x00429058 in PROC6 () at main.pp:500
#5  0x00429068 in PROC5 () at main.pp:505
#6  0x00429078 in PROC4 () at main.pp:510
#7  0x00429088 in PROC3 () at main.pp:515
#8  0x00429098 in PROC2 () at main.pp:520
#9  0x004290a8 in PROC1 () at main.pp:525


Not sure why fpc did not include procedure names in the output of dwarf then.

Bart




More information about the Lazarus mailing list