-g and -ggdb
H.J. Lu
hjl@lucon.org
Sat Dec 6 18:38:00 GMT 1997
> 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)
More information about the Gcc
mailing list