diff options
author | Yao Qi <yao@codesourcery.com> | 2012-09-21 01:46:46 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2012-09-21 01:46:46 +0000 |
commit | 82a90ccf2a55f1cdd4266e638a442bb07df6235f (patch) | |
tree | 8033a64b459af875a3c968054f8cbb8ddcaea450 /gdb/record.c | |
parent | 27755b66789bfeb0b1935c66e45cf2624f8ca1bb (diff) |
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.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/record.c b/gdb/record.c index 5cbac00722..c98ed321b9 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")); |