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 18:38:07 -0800 (PST)
- Cc: egcs at cygnus dot com
> However, on Linux, the "vendor" toolchain is GNU. So, the usual
> debugger is gdb. So, the "native format" should be whatever works best
> with gdb, IMO. That's what -ggdb. At present, on Linux, egcs -g
> generates stabs, while -ggdb generates DWARF2.
>
> I claim that this situation makes no sense. In particular, if GDB is
> the usual debugger, then -g should be the same as -ggdb, so either -g
> or -ggdb is currently doing the wrong thing.
>
> But, perhaps I'm missing something: what do you mean that stabs are
> the native format on Linux? Is there a meaning of native other than
> the one I'm thinking of?
When we started working on ELF and gdb, DWARF2 was not an option since
gcc didn't support it as good as stabs. So we chose stabs as the native
format for Linux. I just saw a DWARF2 bug reported a few days ago.
--
H.J. Lu (hjl@gnu.org)