Debugging dynamically linked executables
Mark Kettenis
kettenis@wins.uva.nl
Sat May 8 09:06:00 GMT 1999
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
More information about the Gdb
mailing list