[Lazarus] Stacktrace using Dwarf vs Stabs (maybe an RTFM question).
Martin Frb
lazarus at mfriebe.de
Tue Jan 13 13:25:31 CET 2015
On 13/01/2015 12:04, Bart wrote:
> Hi,
>
> Currently I use stabs as default type for debug info.
> However it seems that dwarf is now supposed to be the preferred setting?
>
> Here I deliberately crash a program.
> (Lazarus 1.5, fpc 2.6.4, win32 on win7-64)
>
> The stacktrace output is:
>
> Stabs (-gs):
> 1 div 0 = TApplication.HandleException Division by zero
> Stack trace:
> $0042AC6D PROC10, line 477 of main.pp
...
> Dwarf (-gw2)
> 1 div 0 = TApplication.HandleException Division by zero
> Stack trace:
> $0042B56D line 477 of main.pp
....
>
> I prefer the fact that stabs puts in the procedurenames in the
> backtrace, where dwarf doesn not.
> The dwarf stacktrace is not very usefull in this way to me.
>
> Did I miss some configuration option to let dwarf put in the procedurenames?
>
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.
Just as a note. If you ship your app, you can strip debug info, but keep
an identical build with debug info for yourself. If a user sends you a
trace (addresses only / no line numbers), you can use "LeakView" (used
to be Tools menu, now "View" > "leaks and traces"): Paste the raw stack
trace, press "resolve" and select your unstripped copy of the exe.
Of course you can also paste a trace that has line numbers.
More information about the Lazarus
mailing list