disabled ones can just stay disabled. */
static void
-disable_breakpoints_in_unloaded_shlib (struct so_list *solib)
+disable_breakpoints_in_unloaded_shlib (program_space *pspace, so_list *solib)
{
bool disabled_shlib_breaks = false;
/* ALL_BP_LOCATIONS bp_location has LOC->OWNER always non-NULL. */
struct breakpoint *b = loc->owner;
- if (solib->pspace == loc->pspace
+ if (pspace == loc->pspace
&& !loc->shlib_disabled
&& (((b->type == bp_breakpoint
|| b->type == bp_jit_event
}
static void
-bsd_uthread_solib_unloaded (struct so_list *so)
+bsd_uthread_solib_unloaded (program_space *pspace, so_list *so)
{
if (!bsd_uthread_solib_name)
return;
haven't been loaded yet. */
extern observable<struct so_list */* solib */> solib_loaded;
-/* The shared library specified by SOLIB has been unloaded. Note
- that when gdb calls this observer, the library's symbols have not
+/* The shared library SOLIB has been unloaded from program space PSPACE.
+ Note when gdb calls this observer, the library's symbols have not
been unloaded yet, and thus are still available. */
-extern observable<struct so_list */* solib */> solib_unloaded;
+extern observable<struct program_space */* pspace */, struct so_list */* solib */>
+ solib_unloaded;
/* The symbol file specified by OBJFILE has been loaded. Called
with OBJFILE equal to NULL to indicate previously loaded symbol
/* Notify interpreters and observers that solib SO has been unloaded. */
static void
-notify_solib_unloaded (so_list *so)
+notify_solib_unloaded (program_space *pspace, so_list *so)
{
interps_notify_solib_unloaded (so);
- gdb::observers::solib_unloaded.notify (so);
+ gdb::observers::solib_unloaded.notify (pspace, so);
}
/* See solib.h. */
{
/* Notify any observer that the shared object has been
unloaded before we remove it from GDB's tables. */
- notify_solib_unloaded (gdb);
+ notify_solib_unloaded (current_program_space, gdb);
current_program_space->deleted_solibs.push_back (gdb->so_name);
/* Fill in the rest of each of the `struct so_list' nodes. */
for (i = inferior; i; i = i->next)
{
-
- i->pspace = current_program_space;
current_program_space->added_solibs.push_back (i);
try
struct so_list *so = current_program_space->so_list;
current_program_space->so_list = so->next;
- notify_solib_unloaded (so);
+ notify_solib_unloaded (current_program_space, so);
current_program_space->remove_target_sections (so);
free_so (so);
}
/* Shared object file name, expanded to something GDB can open. */
char so_name[SO_NAME_MAX_PATH_SIZE];
- /* Program space this shared library belongs to. */
- struct program_space *pspace;
-
/* The following fields of the structure are built from
information gathered from the shared object file itself, and
are set when we actually add it to our symbol tables.