aboutsummaryrefslogtreecommitdiff
path: root/gdb/exec.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2005-03-08 04:34:45 +0000
committerJoel Brobecker <brobecker@gnat.com>2005-03-08 04:34:45 +0000
commitea53e89f14887acd25d0538f6bfb0f3a632f3bae (patch)
tree0203bdba7a68a1d8838ce7c9263c1eec7cba71ae /gdb/exec.c
parent9a6351f1d23c0b4c67f9600f678afdf942d7af96 (diff)
downloadfsf-binutils-gdb-ea53e89f14887acd25d0538f6bfb0f3a632f3bae.zip
fsf-binutils-gdb-ea53e89f14887acd25d0538f6bfb0f3a632f3bae.tar.gz
fsf-binutils-gdb-ea53e89f14887acd25d0538f6bfb0f3a632f3bae.tar.bz2
* doc/observer.texi (executable_changed): New observer.
* symtab.c: Include "observer.h". (find_main_name): New function. (main_name): If name_of_main is unset, then compute it using find_main_name. (symtab_observer_executable_changed): New function. (_initialize_symtab): Attach executable_changed observer. * exec.c: Include "observer.h". (exec_file_attach): Emit executable_changed notification. * symfile.c: Include "observer.h". (reread_symbols): Send an executable_changed if appropriate. * Makefile.in (exec.o): Add dependency on observer.h. (symfile.o): Likewise. (symtab.o): Likewise.
Diffstat (limited to 'gdb/exec.c')
-rw-r--r--gdb/exec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/exec.c b/gdb/exec.c
index 875cee5..6bf524a 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -32,6 +32,7 @@
#include "completer.h"
#include "value.h"
#include "exec.h"
+#include "observer.h"
#include <fcntl.h>
#include "readline/readline.h"
@@ -276,6 +277,7 @@ exec_file_attach (char *filename, int from_tty)
(*deprecated_exec_file_display_hook) (filename);
}
bfd_cache_close_all ();
+ observer_notify_executable_changed (NULL);
}
/* Process the first arg in ARGS as the new exec file.