dwarf-2 is good - any other suggestions?

After switching from the default (-g) debug format to dwarf-2 (-gdwarf-2) we
have seen some major improvements in our C++ development environment, namely

  • DDD/gdb is more stable
  • DDD/gdb shows the class hierarchy properly when you view a class object
  • ld doesn’t crash :wink:

I thought I’d post this for a few reasons:

  • To share the good news with anyone else who hasn’t discovered this for
    themselves
  • To mention that it doesn’t seem to be discussed/recommended in the
    documentation anywhere
  • To ask whether anyone else has similar “tricks” that they would like to
    share?

Rob Rutherford
Ruzz Technology

This was actually mentioned several times in newsgroups. Default debug
format (dwarf) support is broken in GCC. Using stabs or dwarf-2 is better
for all purposes.

  • igor

“Robert Rutherford” <ruzz@ruzz.com> wrote in message
news:9mcc88$mm8$1@inn.qnx.com

After switching from the default (-g) debug format to dwarf-2 (-gdwarf-2)
we
have seen some major improvements in our C++ development environment,
namely

  • DDD/gdb is more stable
  • DDD/gdb shows the class hierarchy properly when you view a class object
  • ld doesn’t crash > :wink:

I thought I’d post this for a few reasons:

  • To share the good news with anyone else who hasn’t discovered this for
    themselves
  • To mention that it doesn’t seem to be discussed/recommended in the
    documentation anywhere
  • To ask whether anyone else has similar “tricks” that they would like to
    share?

Rob Rutherford
Ruzz Technology

Igor Kovalenko <kovalenko@home.com> wrote:
: This was actually mentioned several times in newsgroups. Default debug
: format (dwarf) support is broken in GCC. Using stabs or dwarf-2 is better
: for all purposes.

Agreed, however, IIRC stabs (-gstabs) will generate bigger code size.
Thanks to the OP, for posting the reminder, it does not hurt and may
save time to lots of newbies.

Alain Magloire a écrit :

Igor Kovalenko <> kovalenko@home.com> > wrote:
: This was actually mentioned several times in newsgroups. Default debug
: format (dwarf) support is broken in GCC. Using stabs or dwarf-2 is better
: for all purposes.

Agreed, however, IIRC stabs (-gstabs) will generate bigger code size.
Thanks to the OP, for posting the reminder, it does not hurt and may
save time to lots of newbies.

Maybe it would be interesting to modify the debug option in qmacros.mk.

Regards,
Alain.