This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Debug formats on Linux


> 
> On Fri, 5 Dec 1997, Mark Mitchell wrote:
> 
> > 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.
> 
> and on Sat, 6 Dec 1997, Per Bothner wrote:
> 
> > > On Linux, the "native format" is stabs. gcc seems to work according
> > > to the manual.
> >
> > The point is that the native on format on Linux *should* be Dwarf2,
> > as soon as Dwarf2 works as well or better than stabs.  The question
> > is:  Are we there yet?  I think we are close.
> 
> Nearly three years on, we still have the same confusing situation that -g
> generates stabs and -ggdb generates DWARF2 on Linux, even though gdb is
> the native debugger.  Are we yet ready (in terms of maturity of DWARF2
> support versus stabs in GCC and GDB, and in gdb sensibly handling
> executables containing a mixture of both debugging types) for this to
> change?  Is a move to DWARF2 still considered desirable if it is ready to
> become the native Linux format?
> 
> It has also been mentioned, though I can't find the relevant messages
> right now, that DWARF2 debugging info would allow debugging to work with
> -fomit-frame-pointer on systems where it presently doesn't.  If this is
> the case, and if GDB has or gets the support for this, that would seem a
> reason to change (and -fomit-frame-pointer could then be turned on at -O
> or -O2 for such systems if beneficial, e.g. x86-linux).
> 

I benchmarked -fomit-frame-pointer with gcc 2.95 and speed bonus was
well under 10%, and I think under 5%.  I found this funny since I
would expect an additional register woukld have a big impact on
register-starved x86s.  But unless omit-frame-pointer gives a far
bigger impact I would not want to go through yet another massive
change on Linux.  I have had enough with libc4 -> libc5 -> glibc plus
the uncompatible C++ libraries from
 gcc-2.7 -> egcs -> gcc-2.9[56]->gcc-3

-- 
			Jean Francois Martinez

Project Independence: Linux for the Masses
http://www.independence.seul.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]