/* If the solist is global across inferiors, don't clear it when we
detach from a single inferior. */
if (!gdbarch_has_global_solist (inf->arch ()))
- no_shared_libraries ();
+ no_shared_libraries (inf->pspace);
if (deprecated_detach_hook)
deprecated_detach_hook ();
query_if_trace_running (from_tty);
disconnect_tracing ();
target_disconnect (args, from_tty);
- no_shared_libraries ();
+ no_shared_libraries (current_program_space);
init_thread_list ();
update_previous_thread ();
if (deprecated_detach_hook)
/* Also, loading a symbol file below may trigger symbol lookups, and
we don't want those to be satisfied by the libraries of the
previous incarnation of this process. */
- no_shared_libraries ();
+ no_shared_libraries (current_program_space);
inferior *execing_inferior = current_inferior ();
inferior *following_inferior;
set_current_program_space (this);
breakpoint_program_space_exit (this);
- no_shared_libraries ();
+ no_shared_libraries (this);
free_all_objfiles ();
/* Defer breakpoint re-set because we don't want to create new
locations for this pspace which we're tearing down. */
}
/* First delete any symbols previously loaded from shared libraries. */
- no_shared_libraries ();
+ no_shared_libraries (current_program_space);
/* Start the remote connection. If error() or QUIT, discard this
target (we'd otherwise be in an inconsistent state) and then
/* See solib.h. */
void
-no_shared_libraries ()
+no_shared_libraries (program_space *pspace)
{
/* The order of the two routines below is important: clear_solib notifies
the solib_unloaded observers, and some of these observers might need
access to their associated objfiles. Therefore, we can not purge the
solibs' objfiles before clear_solib has been called. */
- clear_solib (current_program_space);
- objfile_purge_solibs (current_program_space);
+ clear_solib (pspace);
+ objfile_purge_solibs (pspace);
}
/* Implements the command "nosharedlibrary", which discards symbols
static void
no_shared_libraries_command (const char *ignored, int from_tty)
{
- no_shared_libraries ();
+ no_shared_libraries (current_program_space);
}
/* See solib.h. */
extern bool in_solib_dynsym_resolve_code (CORE_ADDR);
-/* Discard symbols that were auto-loaded from shared libraries. */
+/* Discard symbols that were auto-loaded from shared libraries in PSPACE. */
-extern void no_shared_libraries ();
+extern void no_shared_libraries (program_space *pspace);
/* Synchronize GDB's shared object list with inferior's.
/* solib descriptors may have handles to objfiles. Wipe them before their
objfiles get stale by free_all_objfiles. */
- no_shared_libraries ();
+ no_shared_libraries (current_program_space);
current_program_space->free_all_objfiles ();
memory regions and features. */
if (!gdbarch_has_global_solist (current_inferior ()->arch ()))
{
- no_shared_libraries ();
+ no_shared_libraries (current_program_space);
invalidate_target_mem_regions ();