This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
gdb/874: gdb.texinfo should recommend dwarf-2 (not stabs) for c++ debugging
- From: mec at shout dot net
- To: gdb-gnats at sources dot redhat dot com
- Date: 6 Dec 2002 17:27:40 -0000
- Subject: gdb/874: gdb.texinfo should recommend dwarf-2 (not stabs) for c++ debugging
- Reply-to: mec at shout dot net
>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: