excessive stab information

Nick Clifton nickc@redhat.com
Tue Apr 19 11:44:00 GMT 2005


Hi Ian,

 > Ian Lance Taylor wrote:

> There has been some work done on not linking debug information from
> the object files into the executable, and having gdb fetch it from the
> object files, but I'm not sure what the status of that is.  I didn't
> see anything in the linker docs about it.

FYI:  This feature is fully working.  The reason it is not documented in 
  the linker docs however is because it is not performed by the linker. 
  It is performed by the objcopy program using the --strip-debug, 
--only-keep-debug and --add-gnu-debuglink switches.  You can find out 
more about this from the binutils documentation.

A word of caution for anyone considering using this feature however.  It 
is definitely known to work with GDB and DWARF (1,2 and 3) debug 
information.  I do not know if it has been tested with STABS debug 
information however, although theoretically there is no reason why it 
should not work.  Also since it is making use of a GNU extension, it 
probably only works with GDB, or debuggers based on GDB.  (Plus of 
course you need a fairly modern version of GDB in order to make use of 
this feature).

Cheers
   Nick



More information about the Binutils mailing list