This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb/874: gdb.texinfo should recommend dwarf-2 (not stabs) for c++ debugging


>Number:         874
>Category:       gdb
>Synopsis:       gdb.texinfo should recommend dwarf-2 (not stabs) for c++ debugging
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 06 09:28:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     mec@shout.net
>Release:        HEAD%20021203
>Organization:
>Environment:
Documentation bug
>Description:
doc/gdb.texinfo says:

  @c FIXME!! GDB may eventually be able to debug C++ using DWARF; check
  @c periodically whether this has happened...

This section of the documentation says that gdb cannot debug C++ with DWARF or COFF debugging formats, and recommends stabs instead.

In fact, dwarf-2 is the best working debug format for C++, and stabs+ (not stabs) is second best.  The user can specify stabs+ with "gcc -gstabs+" or "gcc -gstabs -ggdb".

It's actively harmful to recommend that people use stabs or stabs+ with C++.

Also, I've heard that as of gcc 3.1 or 3.2, the default debug format for i686-pc-linux-gnu has changed from stabs+ to dwarf-2.  It might be useful to nail that information down and document it.
>How-To-Repeat:
Read doc/gdb.texinfo
>Fix:
Track down the facts and rewrite this section.
>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]