This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: excessive stab information


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


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