diff options
author | Orjan Friberg <orjanf@axis.com> | 2004-04-26 09:49:36 +0000 |
---|---|---|
committer | Orjan Friberg <orjanf@axis.com> | 2004-04-26 09:49:36 +0000 |
commit | f4c5303c32d8fda229d182d9d7db4ceb64bf9e02 (patch) | |
tree | 1019d06d4acf0538f5f116d80bcfd0c9f867d287 /gdb/frame.c | |
parent | 79346bcbc0a0cc4086e810f116a1fcd39c7cd2ef (diff) | |
download | gdb-f4c5303c32d8fda229d182d9d7db4ceb64bf9e02.zip gdb-f4c5303c32d8fda229d182d9d7db4ceb64bf9e02.tar.gz gdb-f4c5303c32d8fda229d182d9d7db4ceb64bf9e02.tar.bz2 |
2004-04-26 Orjan Friberg <orjanf@axis.com>
* frame.c: Include "observer.h".
(frame_observer_target_changed): New function.
(_initialize_frame): Attach target_changed observer.
* regcache.c: Include "observer.h".
(regcache_observer_target_changed): New function.
(_initialize_regcache): Attach target_changed observer.
* valops.c: Include "observer.h".
(value_assign): Notify target_changed event when modifying register.
* Makefile.in (frame.o, regcache.o, valops.o): Add $(observer_h).
Diffstat (limited to 'gdb/frame.c')
-rw-r--r-- | gdb/frame.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/frame.c b/gdb/frame.c index f9384fe..bdb6cb9 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -39,6 +39,7 @@ #include "frame-base.h" #include "command.h" #include "gdbcmd.h" +#include "observer.h" static struct frame_info *get_prev_frame_1 (struct frame_info *this_frame); @@ -1237,6 +1238,14 @@ get_next_frame (struct frame_info *this_frame) return NULL; } +/* Observer for the target_changed event. */ + +void +frame_observer_target_changed (struct target_ops *target) +{ + flush_cached_frames (); +} + /* Flush the entire frame cache. */ void @@ -2356,6 +2365,8 @@ _initialize_frame (void) { obstack_init (&frame_cache_obstack); + observer_attach_target_changed (frame_observer_target_changed); + add_prefix_cmd ("backtrace", class_maintenance, set_backtrace_cmd, "\ Set backtrace specific variables.\n\ Configure backtrace variables such as the backtrace limit", |