From 56ce570627c073cbf96a483c0be95ce6bbb10098 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Wed, 1 Sep 2004 18:00:29 +0000 Subject: 2004-09-01 Jeff Johnston * observer.sh: Add struct so_list declaration. * Makefile.in: Add dependencies on observer.h for solib.c and breakpoint.c. * breakpoint.c (disable_breakpoints_in_unloaded_shlib): New function. (_initialize_breakpoint): Register disable_breakpoints_in_unloaded_shlib as an observer of the "solib unloaded" observation event. (re_enable_breakpoints_in_shlibs): For bp_shlib_disabled breakpoints, call decode_line_1 so unfound breakpoint errors are silent. * solib.c (update_solib_list): When a solib is discovered to have been unloaded by the program, notify all observers of the "solib unloaded" observation event. --- gdb/solib.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gdb/solib.c') diff --git a/gdb/solib.c b/gdb/solib.c index e722b985ad6..89275687194 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -42,6 +42,7 @@ #include "filenames.h" /* for DOSish file names */ #include "exec.h" #include "solist.h" +#include "observer.h" #include "readline/readline.h" /* external data declarations */ @@ -478,6 +479,10 @@ update_solib_list (int from_tty, struct target_ops *target) /* If it's not on the inferior's list, remove it from GDB's tables. */ else { + /* Notify any observer that the SO has been unloaded + before we remove it from the gdb tables. */ + observer_notify_solib_unloaded (gdb); + *gdb_link = gdb->next; /* Unless the user loaded it explicitly, free SO's objfile. */ -- cgit v1.2.1