[RFA] Call SOLIB_CREATE_INFERIOR_HOOK for remote targets.

Michael Snyder msnyder@cygnus.com
Tue Oct 31 16:33:00 GMT 2000


I want to add this call to remote_open, so that we can debug shared
libraries on a remote target.  This works together with Kevin Buettner's
recent changes to the solib code.

2000-10-31  Michael Snyder  <msnyder@cleaver.cygnus.com>

        * remote.c (remote_open): Call SOLIB_CREATE_INFERIOR_HOOK
        (if defined), so that shared libraries can be detected.

Index: remote.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/remote.c,v
retrieving revision 1.290
diff -c -3 -p -r1.290 remote.c
*** remote.c	2000/10/25 12:55:39	1.290
--- remote.c	2000/11/01 00:31:00
***************
*** 51,56 ****
--- 51,57 ----
  
  #include <signal.h>
  #include "serial.h"
+ #include "gdbcore.h" /* for exec_bfd */
  
  /* Prototypes for local functions */
  static void cleanup_sigint_signal_handler (void *dummy);
*************** static void
*** 2000,2005 ****
--- 2001,2010 ----
  remote_open (char *name, int from_tty)
  {
    remote_open_1 (name, from_tty, &remote_ops, 0);
+ #ifdef SOLIB_CREATE_INFERIOR_HOOK
+   if (exec_bfd) 	/* no use without one... */
+     SOLIB_CREATE_INFERIOR_HOOK (inferior_pid);
+ #endif
  }
  
  /* Just like remote_open, but with asynchronous support. */


More information about the Gdb-patches mailing list