Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2010-03

DWARF2 or DWARF3 debug info

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

I'm using FPC 2.4.1 with GDB 6.8 under Ubuntu 8.04.2 LTS on a all 64-bit system.

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? I read somewhere that STABS supports property getter methods where DWARF can't - is this true?
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.

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

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Jonas Maebe
to Graeme Geldenhuys
Graeme Geldenhuys wrote 6 lines
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

Reply by email