This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Debugging dynamically linked executables
- To: gdb@cygnus.com
- Subject: Debugging dynamically linked executables
- From: Mark Kettenis <kettenis@wins.uva.nl>
- Date: Sat, 8 May 1999 16:45:39 +0200 (CEST)
AFAICT it is not possible to make gdb stop at the first instruction
that will be executed for a dynamically linked executable (which will
probably be the first instruction of the dynamic linker).
This is obviously related to the following item from the TODO list:
It should be possible to use symbols from shared libraries before we know
exactly where the libraries will be loaded. E.g. "b perror" before running
the program. This could maybe be done as an extension of the "breakpoint
re-evaluation" after new symbols are loaded.
However, the implementation would be a lot simpler since we can simply
hook up to the SIGTRAP that is sent to the debugger anyway.
This would make it easier to debug the dynamic linker and could also
help in the maintenance of gdb itself.
I was thinking about adding an option (suggested name
stop-on-startup), so that people could say "set stop-on-startup 1".
Would this be acceptable?
Mark