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: -g and -ggdb


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

Here is what is in gcc.info:

`-g'
     Produce debugging information in the operating system's native
     format (stabs, COFF, XCOFF, or DWARF).  GDB can work with this
     debugging information.

`-ggdb'
     Produce debugging information for use by GDB.  This means to use
     the most expressive format available (DWARF 2, stabs, or the
     native format if neither of those are supported), including GDB
     extensions if at all possible.

On Linux, the "native format" is stabs. gcc seems to work according
to the manual.


-- 
H.J. Lu (hjl@gnu.org)


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