[Lazarus] RE : Generating line info

Martin lazarus at mfriebe.de
Mon Sep 19 20:57:09 CEST 2011


On 19/09/2011 19:41, Ludo Brands wrote:
>> You can always select any debug format you want.
>>
> Why has Lazarus changed the default debug format to dwarf on windows?
> Lnfodwrf is doing a poor job of looking up symbols (it only looks for line
> information) and it crashes under certain circumstances. See
> http://bugs.freepascal.org/view.php?id=20296.
> I understand dwarf is the future and stabs dying a slow death. But currently
> the dwarf has still to learn walking and stabs is still a fit senior.
>

First of all it, you're case is special, it is the only one that 
actually performed the upgrade.
The following rules are used:
* If the old config had:
   - "debug info -g" enbled
   - "dwarf -gw" disabled
then (never mind the state of -gl -gh -gv ...) the new config has "debug 
enabled, using stabs", and kept all other options as they where

The above settings (in the old config) are assumed the user wanted 
explicitly stabs (even so, they have a same likely hood that the user 
just clicked the first options, and had no idea what the "dwarf" otpion 
even means...)

* if the old config had none of the flags => then so does the new

I if the old config had
   - "debug info -g" enbled
   - "dwarf -gw" enabled (or any other -g### enabled)
then the new config defaults to dwarf.


so having set only -gl triggered the last setting.

As explained only -gl  does not exist, it triggers some debug info 
anyway => it was assumed that the user may not have understood that, and 
therefore it gets corrected to the recommended new settings.

Of course, it is possible, that an expert user, who understood that fpc 
would include the -g for a -gl, had set -gl only (saving the time of 
checking a 2nd options) => but an expert user should easily be able to 
correct this.

--------------
Also see my other mail: dwarf will solve some of the issues that new 
users (and old users too often complain abut). It does make some (only 
some, but at least that) of the properties inspectable.

I admit, the fact that people would include debug info for the purpose 
of stacktraces on stderr only (and not to use gdb), never came to mind.
Yet, even if there would not have been a reason: except for the recent 
bug in infodwrf (which hopefully will get fixed) I never thought there 
was an important difference for stacktraces. Of course, I have never 
attempted to read them myself => I do use them (very frequently) but I 
always import them into "leak view", so I never realized the difference.

Anyway, as I already pointed out, it can be easily fixed, by setting the 
info to stabs, if required.





More information about the Lazarus mailing list