This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] remote.c: discard symbols from shared libraries.
- To: gdb-patches at sources dot redhat dot com
- Subject: [RFA] remote.c: discard symbols from shared libraries.
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Tue, 17 Apr 2001 14:37:38 -0700
- CC: cagney at cygnus dot com, jtc at redback dot com, kevinb at cygnus dot com
- Organization: Red Hat
Since (again) there is no "run" equivalent, I propose we throw away
existing shared library symbols at the same time when we set up to
detect new shared libraries -- in remote_open_1.
2001-04-17 Michael Snyder <msnyder@redhat.com>
* remote.c (remote_open_1) Call no_shared_libraries to delete
all symbols previously loaded from shared libraries.
Index: remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.45
diff -c -3 -p -r1.45 remote.c
*** remote.c 2001/04/17 20:31:00 1.45
--- remote.c 2001/04/17 21:31:49
*************** serial device is attached to the remote
*** 2155,2166 ****
putpkt ("!");
getpkt (buf, PBUFSIZ, 0);
}
/* FIXME: need a master target_open vector from which all
remote_opens can be called, so that stuff like this can
go there. Failing that, the following code must be copied
to the open function for any remote target that wants to
support svr4 shared libraries. */
! #ifdef SOLIB_CREATE_INFERIOR_HOOK
if (exec_bfd) /* No use without an exec file. */
SOLIB_CREATE_INFERIOR_HOOK (inferior_pid);
#endif
--- 2155,2170 ----
putpkt ("!");
getpkt (buf, PBUFSIZ, 0);
}
+ #ifdef SOLIB_CREATE_INFERIOR_HOOK
/* FIXME: need a master target_open vector from which all
remote_opens can be called, so that stuff like this can
go there. Failing that, the following code must be copied
to the open function for any remote target that wants to
support svr4 shared libraries. */
!
! /* First delete any symbols previously loaded from shared libraries. */
! no_shared_libraries (NULL, 0);
! /* Now set up to detect and load shared libraries. */
if (exec_bfd) /* No use without an exec file. */
SOLIB_CREATE_INFERIOR_HOOK (inferior_pid);
#endif
*************** serial device is attached to the remote
*** 2258,2269 ****
putpkt ("!");
getpkt (buf, PBUFSIZ, 0);
}
/* FIXME: need a master target_open vector from which all
remote_opens can be called, so that stuff like this can
go there. Failing that, the following code must be copied
to the open function for any remote target that wants to
support svr4 shared libraries. */
! #ifdef SOLIB_CREATE_INFERIOR_HOOK
if (exec_bfd) /* No use without an exec file. */
SOLIB_CREATE_INFERIOR_HOOK (inferior_pid);
#endif
--- 2262,2277 ----
putpkt ("!");
getpkt (buf, PBUFSIZ, 0);
}
+ #ifdef SOLIB_CREATE_INFERIOR_HOOK
/* FIXME: need a master target_open vector from which all
remote_opens can be called, so that stuff like this can
go there. Failing that, the following code must be copied
to the open function for any remote target that wants to
support svr4 shared libraries. */
!
! /* First delete any symbols previously loaded from shared libraries. */
! no_shared_libraries (NULL, 0);
! /* Now set up to detect and load shared libraries. */
if (exec_bfd) /* No use without an exec file. */
SOLIB_CREATE_INFERIOR_HOOK (inferior_pid);
#endif