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.
This commit is contained in:
Yao Qi
2012-09-21 01:46:46 +00:00
parent 27755b6678
commit 82a90ccf2a
10 changed files with 102 additions and 1 deletions

View File

@@ -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"));