[fpc-pascal] DWARF2 or DWARF3 debug info

Jonas Maebe jonas.maebe at elis.ugent.be
Thu Mar 25 14:31:24 CET 2010


On 25 Mar 2010, at 13:38, Graeme Geldenhuys wrote:

> As far as I understand the preferred debug information format is DWARF
> instead of STABS. This brings me to a few questions.
>
> * Does DWARF info have all the features STABS had? If not, what does  
> STABS
>  have that DWARF doesn't?

In general, it's the other way around: more things are supported with  
DWARF than with stabs (e.g. absolute variables, properties, private/ 
protected sections). Only a few things work with Stabs that don't work  
(yet) with DWARF. The only thing I can think of right now that works  
with Stabs but not with DWARF is var-parameters (as you mentioned in  
your other mail): they are currently replaced by C++-style reference  
parameters in DWARF (for both 32 and 64 bit). You can still get their  
value by simply printing them (without dereferencing them), but when  
looking at a stack frame they are shown as "&address" instead of the  
value. This has to be solved in GDB.

> I read somewhere that STABS supports property
>  getter methods where DWARF can't - is this true?

No.

>  Switching to STABS by recompiling all my code and trying to run it  
> via
>  Lazarus IDE, the IDE instantly crashed and couldn't even start my
>  application - so I couldn't test STABS and switched back to DWARF.

Stabs is defined as a 32 bit debugging format, so it's normal that it  
doesn't work for 64 bit programs.

> * What version of DWARF v2 (-gw2) or v3 (-gw3) is recommended?

v2.


Jonas



More information about the fpc-pascal mailing list