aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/solib.c')
-rw-r--r--gdb/solib.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/solib.c b/gdb/solib.c
index f3e03a1..800319f 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -999,8 +999,13 @@ sharedlibrary_command (char *args, int from_tty)
void
no_shared_libraries (char *ignored, int from_tty)
{
- objfile_purge_solibs ();
+ /* 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 ();
+ objfile_purge_solibs ();
}
static void