From ea53e89f14887acd25d0538f6bfb0f3a632f3bae Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Tue, 8 Mar 2005 04:34:45 +0000 Subject: * 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. --- gdb/doc/observer.texi | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gdb/doc') diff --git a/gdb/doc/observer.texi b/gdb/doc/observer.texi index 8cba160..2d1c9f4 100644 --- a/gdb/doc/observer.texi +++ b/gdb/doc/observer.texi @@ -83,6 +83,13 @@ The inferior has stopped for real. The target's register contents have changed. @end deftypefun +@deftypefun void executable_changed (void *@var{unused_args}) +The executable being debugged by GDB has changed: The user decided +to debug a different program, or the program he was debugging has +been modified since being loaded by the debugger (by being recompiled, +for instance). +@end deftypefun + @deftypefun void inferior_created (struct target_ops *@var{objfile}, int @var{from_tty}) @value{GDBN} has just connected to an inferior. For @samp{run}, @value{GDBN} calls this observer while the inferior is still stopped -- cgit v1.1