This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: How does solib handline shared library unloads?
> Date: Tue, 1 Nov 2005 11:24:37 -0500
> From: Daniel Jacobowitz <drow@false.org>
>
> On Tue, Nov 01, 2005 at 11:20:25AM -0500, Christopher Faylor wrote:
> > Cygwin sets TARGET_WAITKIND_LOADED when a DLL is loaded but I don't see
> > any corresponding TARGET_WAITKIND_UNLOADED. It doesn't look like
> > TARGET_WAITKIND_LOADED calls solib_add, though.
>
> Yes: those are (were) just used for catch, not for actual shared
> library list management. This is bogus; that's the part that ought to
> be fixed in core GDB.
Indeed, there's quite a bit old cruft in the shared library code.
HP-UX doesn't use TARGET_WAITKIND_LOADED anymore, but it seems it is
still used for AIX. That said, it defenitely is preferable to have
those events instead of overloading the breakpoint mechanism like
Linux does. Using shared library breakpoints means that core GDB
needs to figure out whether we stopped because of a shared library
event or a normal breakpoint. Chris, if your OS can tell you why it
stopped, you shouldn't throw away that information.
Mark