[RFA] Link remote target with svr4 solibs.

Michael Snyder msnyder@cygnus.com
Mon Mar 12 16:13:00 GMT 2001


The following change is necessary in order to activate svr4 solib debugging
for remote targets.  With it, GDB will detect when the remote target loads
a new shared library (using the method implemented in solib-svr4.c), and
GDB will load the symbols for the library (provided that GDB has been told
where to find the symbol files, using the "set solib-search-path" and
"set solib-absolute-prefix" commands.
2001-03-12  Michael Snyder  <msnyder@redhat.com>

	* remote.c (remote_open): On opening the remote target, activate
	the solib_create_inferior_hook, so that it can detect when the
	target loads shared libraries.

Index: remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.41
diff -c -3 -p -r1.41 remote.c
*** remote.c	2001/03/06 08:21:13	1.41
--- remote.c	2001/03/12 23:58:32
*************** static void
*** 2002,2007 ****
--- 2002,2011 ----
  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 an exec file. */
+     SOLIB_CREATE_INFERIOR_HOOK (inferior_pid);
+ #endif
  }
  
  /* Just like remote_open, but with asynchronous support. */


More information about the Gdb-patches mailing list