aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-svr4.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2023-10-02 14:46:18 -0400
committerSimon Marchi <simon.marchi@efficios.com>2023-10-19 10:57:51 -0400
commit581b34c2a153d36876ec92bbcd1820ac1d99f83b (patch)
treec79693a31eab84dea680b98c942ab307a996ab60 /gdb/solib-svr4.c
parent6fe4d5bf18512798b3a685599bfcff5aab3f798e (diff)
downloadgdb-581b34c2a153d36876ec92bbcd1820ac1d99f83b.zip
gdb-581b34c2a153d36876ec92bbcd1820ac1d99f83b.tar.gz
gdb-581b34c2a153d36876ec92bbcd1820ac1d99f83b.tar.bz2
gdb: add program_space parameter to target_so_ops::clear_solib
The clear_solib is implicitly meant to clear the resources associated to the current program space (that's what the solib implementations that actually support multi-program-space / multi-inferior do). Make that explicit by adding a program_space parameter and pass down current_program_space in call sites. The implementation of the clear_solib callbacks is fairly simple, I don't think any of them rely on global state other than accessing current_program_space. Change-Id: I8d0cc4db7b4f8db8d7452879c0c62db03269bf46 Approved-By: Pedro Alves <pedro@palves.net> Reviewed-By: Reviewed-By: Lancelot Six <lancelot.six@amd.com>
Diffstat (limited to 'gdb/solib-svr4.c')
-rw-r--r--gdb/solib-svr4.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 7bc6ca4..1f8b8b3 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -3178,11 +3178,9 @@ svr4_solib_create_inferior_hook (int from_tty)
}
static void
-svr4_clear_solib (void)
+svr4_clear_solib (program_space *pspace)
{
- struct svr4_info *info;
-
- info = get_svr4_info (current_program_space);
+ svr4_info *info = get_svr4_info (pspace);
info->debug_base = 0;
info->debug_loader_offset_p = 0;
info->debug_loader_offset = 0;