aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2023-09-27 16:39:36 -0400
committerSimon Marchi <simon.marchi@efficios.com>2023-10-02 11:53:21 -0400
commitbd93891c9ae1adda01631459eb8da8309a2f9d60 (patch)
treedcbc56b5c79270ca82f2ced23a5b89b666582747 /gdb/solib.c
parentdc63d5682e48ab64724a2da2ee803cd13bf5f0c0 (diff)
downloadgdb-bd93891c9ae1adda01631459eb8da8309a2f9d60.zip
gdb-bd93891c9ae1adda01631459eb8da8309a2f9d60.tar.gz
gdb-bd93891c9ae1adda01631459eb8da8309a2f9d60.tar.bz2
gdb: remove solib::pspace field
This backlink is not necessary, we always know the program space from the context. Pass it down the solib_unloaded observer. Change-Id: I45a503472dc791f517558b8141901472634e0556 Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/solib.c')
-rw-r--r--gdb/solib.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gdb/solib.c b/gdb/solib.c
index e2636f0..f914822 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -763,10 +763,10 @@ notify_solib_loaded (so_list *so)
/* 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. */
@@ -869,7 +869,7 @@ update_solib_list (int from_tty)
{
/* 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);
@@ -905,8 +905,6 @@ update_solib_list (int from_tty)
/* 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
@@ -1237,7 +1235,7 @@ clear_solib (void)
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);
}