This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


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

Debugging dynamically linked executables


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 

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