From b8c9d0de904198f73a39aa6bf9b27b4bc015e0f8 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 11 Jul 2024 12:39:35 -0400 Subject: gdb: pass program space to no_shared_libraries Make the current program space reference bubble up one level. Pass `current_program_space` everywhere, except in some cases where we can get the pspace another way, and it's relatively obvious that it's the same as the current program space. Change-Id: Id86b79f1e44f92a398f49d137d57457174dfa96d Approved-By: Tom Tromey Reviewed-By: Thiago Jung Bauermann --- gdb/infcmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/infcmd.c') diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 5738bf0..4ed55f1 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -2827,7 +2827,7 @@ detach_command (const char *args, int from_tty) /* 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 (); @@ -2853,7 +2853,7 @@ disconnect_command (const char *args, int from_tty) 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) -- cgit v1.1