This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] Link remote target with svr4 solibs.
- To: gdb-patches at sources dot redhat dot com
- Subject: [RFA] Link remote target with svr4 solibs.
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Mon, 12 Mar 2001 16:01:32 -0800
- CC: cagney at redhat dot com, kevinb at redhat dot com, hunt at redhat dot com, jsmith at redhat dot com, jtc at redback dot com
- Organization: Red Hat
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. */