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]

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).

-- 
Joseph S. Myers
jsm28@cam.ac.uk


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