summaryrefslogtreecommitdiff
path: root/gdb/record.c
diff options
context:
space:
mode:
authorqiyao <qiyao>2012-09-21 01:46:39 +0000
committerqiyao <qiyao>2012-09-21 01:46:39 +0000
commit052e8b6ee41e74bcb1c19b171f3c96ca74c20224 (patch)
treefe659c13b784dbc2b57bf4fcb04e48cc9982e43d /gdb/record.c
parentbdfd9557a81613f5be89f1ad9cc502d9f9dc25c7 (diff)
downloadgdb-052e8b6ee41e74bcb1c19b171f3c96ca74c20224.tar.gz
gdb/doc:
2012-09-21 Yao Qi <yao@codesourcery.com> Pedro Alves <palves@redhat.com> * gdb.texinfo (GDB/MI Async Records): Document notification 'record-started' and 'record-stopped'. * observer.texi (GDB Observers): New observer 'record-changed'. gdb: 2012-09-21 Yao Qi <yao@codesourcery.com> * mi/mi-interp.c: Declare mi_record_changed. (mi_interpreter_init): Call observer_attach_record_changed. (mi_record_changed): New. * record.c (record_open): Call observer_notify_record_changed. (cmd_record_stop): Call observer_notify_record_changed. * NEWS: Mention it. gdb/testsuite: 2012-09-21 Yao Qi <yao@codesourcery.com> * gdb.mi/mi-record-changed.exp: New. * gdb.mi/mi-reverse.exp: Adjust expected output.
Diffstat (limited to 'gdb/record.c')
-rw-r--r--gdb/record.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/record.c b/gdb/record.c
index 5cbac007222..c98ed321b98 100644
--- a/gdb/record.c
+++ b/gdb/record.c
@@ -33,6 +33,7 @@
#include "event-loop.h"
#include "inf-loop.h"
#include "gdb_bfd.h"
+#include "observer.h"
#include <signal.h>
@@ -1001,6 +1002,8 @@ record_open (char *name, int from_tty)
NULL);
record_init_record_breakpoints ();
+
+ observer_notify_record_changed (current_inferior (), 1);
}
/* "to_close" target method. Close the process record target. */
@@ -2260,6 +2263,8 @@ cmd_record_stop (char *args, int from_tty)
unpush_target (&record_ops);
printf_unfiltered (_("Process record is stopped and all execution "
"logs are deleted.\n"));
+
+ observer_notify_record_changed (current_inferior (), 0);
}
else
printf_unfiltered (_("Process record is not started.\n"));