From a3247a22136e0b53cf5c40c67ee4f5e8eb92ec32 Mon Sep 17 00:00:00 2001 From: Paul Pluzhnikov Date: Thu, 5 Mar 2009 23:45:14 +0000 Subject: 2009-03-05 Paul Pluzhnikov * printcmd.c (do_one_display): Reparse exp_string. (display_uses_solib_p): New function. (clear_dangling_display_expressions): New function. (_initialize_printcmd): Add observer. * solib.c (no_shared_libraries): Swap order of calls to clear_solib and objfile_purge_solibs. --- gdb/solib.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gdb/solib.c') 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 -- cgit v1.1