This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -g and -ggdb
- To: mmitchell at usa dot net
- Subject: Re: -g and -ggdb
- From: hjl at lucon dot org (H.J. Lu)
- Date: Sat, 6 Dec 1997 17:13:50 -0800 (PST)
- Cc: egcs at cygnus dot com
>
>
> Why doesn't -g generate DWARF2 output on Linux? I'd think that -g
> should be synonymous with -ggdb on systems (like Linux) where the
> usual debugger is gdb, but this does not seem to be so. The
> documentation for -g produces debugging information in the operating
> system's "native format". Any thoughts? I'd be happy to fix this, if
> we have consensus on what to do. My proposal:
>
> o Make the "native format" on Linux whatever -ggdb generates.
>
Here is what is in gcc.info:
`-g'
Produce debugging information in the operating system's native
format (stabs, COFF, XCOFF, or DWARF). GDB can work with this
debugging information.
`-ggdb'
Produce debugging information for use by GDB. This means to use
the most expressive format available (DWARF 2, stabs, or the
native format if neither of those are supported), including GDB
extensions if at all possible.
On Linux, the "native format" is stabs. gcc seems to work according
to the manual.
--
H.J. Lu (hjl@gnu.org)