This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC/RFA] Deal with -g1 generated DWARF2 debug info
> Date: Sun, 4 Dec 2005 18:06:46 -0500
> From: Daniel Jacobowitz <drow@false.org>
>
> > > Mark, FYI, we ended up removing all dwarf sections other than
> > > .debug_frame. This plus .symtab are enough to make backtraces useful;
> > > it works quite well and avoids the undertested -g1.
> >
> > Hmm, perhaps we're just lucky, but it seems that all supported OpenBSD
> > platforms have no problem with -g1. I'll keep your idea in mind as
> > plan B. Doesn't it result in gdb printing the wrong function names
> > for static function names in backtraces?
>
> No. It gets those from .symtab; that's why we left it in.
Bleah, turns out we were using ld -x on the object files before
building them into a library. Of course this made local symbols
disappear from .symtab.
Anyway, it seems that my fellow OpenBSD developers are happy with
compiling all system libraries with -g, which of course is much better
;-).
I'll send a message to the GCC mailing list about -g1 & DWARF2.
Mark