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]

Re: Preparing for the GDB 5.0 / GDB 2000 / GDB2k release


   Date: Mon, 7 Feb 2000 20:14:40 -0800
   From: "H . J . Lu" <hjl@lucon.org>

   On Mon, Feb 07, 2000 at 06:15:57PM -0800, Daniel Berlin wrote:
   > Furthermore, i don't see how it's necessary.
   > Why did he add this consistency hook, to fix a problem that occurs when
   > you restart.
   > Why not implement the SOLIB_REMOVE_INFERIOR hook, and rather than the
   > other implementations, which say they don't disable the breakpoints
   > (mainly because of their own reasons), disable the breakpoints in those
   > shared libs.
   > 

   Thanks for your tip. Sam's patch is for gdb 4.17. I ported it to the
   current one. SOLIB_REMOVE_INFERIOR is not available in 4.17. Here is
   a patch which uses SOLIB_REMOVE_INFERIOR.

   Thanks.


   H.J.
   ----
   Mon Feb  7 20:06:42 2000  H.J. Lu  <hjl@gnu.org>

	   Based on a patch from Sam Lantinga (slouken@devolution.com):

	   * solib.c (solib_remove_inferior_hook): New function. Reload
	   list of shared objects when they are added or deleted and dump
	   symbols from unloaded shared objects.

	   * solib.h (SOLIB_REMOVE_INFERIOR_HOOK): New. Defined as
	   solib_remove_inferior_hook.

And this patch solves the big problems you were having with debugging
apps with shared libraries, and the testcase you have (but still have
not showed to us) is working now?  I really doubt that.

For one, this can never solve the dlopen(A), dlclose(A), dlopen(B)
case since SOLIB_REMOVE_INFERIOR_HOOK is only called from within
infrun.c:follow_inferior_fork(), which isn't necessarily called in
this scenario.

Moreover, the comment on solib.c:solib_remove_inferior_hook() is
grossly misappropriate now.  The function isn't called "whenever we
hit a dynamic linker breakpoint".  And this function calls
clear_solib() although the comment on SOLIB_REMOVE_INFERIOR_HOOK
clearly states that this hook isn't meant to remove all shared library
information from the debugger.

Mark

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