aboutsummaryrefslogtreecommitdiff
path: root/gdb/tracepoint.c
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2012-09-18 11:33:43 +0000
committerYao Qi <yao@codesourcery.com>2012-09-18 11:33:43 +0000
commit201b4506b3d34c274cdc5ec5ffb8f6e43fc982a9 (patch)
tree3315adad7b15dc81c715d0e28da3778dbde9e49c /gdb/tracepoint.c
parentfbdc86d9c9e5fe451861a34381bf5483aec43bf1 (diff)
downloadgdb-201b4506b3d34c274cdc5ec5ffb8f6e43fc982a9.zip
gdb-201b4506b3d34c274cdc5ec5ffb8f6e43fc982a9.tar.gz
gdb-201b4506b3d34c274cdc5ec5ffb8f6e43fc982a9.tar.bz2
gdb/doc:
* observer.texi (GDB Observers): New observer 'traceframe_changed'. * gdb.texinfo (GDB/MI Async Records): Mention new MI notification '=traceframe-changed'. gdb: * tracepoint.c (tfind_1): Call observer_notify_traceframe_changed if traceframe changed. * mi/mi-cmds.c (mi_cmd mi_cmds): Adjust for command "trace-find". * mi/mi-interp.c: Declare 'mi_traceframe_changed'. (mi_interpreter_init): Hook mi_traceframe_changed to observer 'traceframe_changed'. (mi_traceframe_changed): New. * mi/mi-main.h (struct mi_suppress_notification) <traceframe>: New field. * NEWS: Mention the new MI notification. gdb/testsuite: * gdb.trace/mi-traceframe-changed.exp: New.
Diffstat (limited to 'gdb/tracepoint.c')
-rw-r--r--gdb/tracepoint.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 3bdd129..296999b 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -2288,9 +2288,13 @@ tfind_1 (enum trace_find_type type, int num,
reinit_frame_cache ();
target_dcache_invalidate ();
+ set_tracepoint_num (tp ? tp->base.number : target_tracept);
+
+ if (target_frameno != get_traceframe_number ())
+ observer_notify_traceframe_changed (target_frameno, tracepoint_number);
+
set_current_traceframe (target_frameno);
- set_tracepoint_num (tp ? tp->base.number : target_tracept);
if (target_frameno == -1)
set_traceframe_context (NULL);
else