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/testsuite | |
parent | 27755b66789bfeb0b1935c66e45cf2624f8ca1bb (diff) | |
download | gdb-82a90ccf2a55f1cdd4266e638a442bb07df6235f.zip gdb-82a90ccf2a55f1cdd4266e638a442bb07df6235f.tar.gz gdb-82a90ccf2a55f1cdd4266e638a442bb07df6235f.tar.bz2 |
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/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-record-changed.exp | 44 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-reverse.exp | 3 |
3 files changed, 51 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 789b49d..f63a476 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-09-21 Yao Qi <yao@codesourcery.com> + + * gdb.mi/mi-record-changed.exp: New. + * gdb.mi/mi-reverse.exp: Adjust expected output. + 2012-09-20 Tom Tromey <tromey@redhat.com> * gdb.python/python.exp: Test atexit.register. diff --git a/gdb/testsuite/gdb.mi/mi-record-changed.exp b/gdb/testsuite/gdb.mi/mi-record-changed.exp new file mode 100644 index 0000000..bb54248 --- /dev/null +++ b/gdb/testsuite/gdb.mi/mi-record-changed.exp @@ -0,0 +1,44 @@ +# Copyright 2012 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +if ![supports_process_record] { + return +} + +standard_testfile basics.c +if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ + executable {debug nowarnings}] != "" } { + untested mi-record-changed.exp + return -1 +} + +load_lib mi-support.exp + +if [mi_gdb_start] { + return +} +mi_run_to_main + +mi_gdb_test "record" ".*=record-started,thread-group=\"i${decimal}\".*\\^done" \ + "record" +mi_gdb_test "record stop" \ + ".*=record-stopped,thread-group=\"i${decimal}\".*\\^done" \ + "record end" + +mi_gdb_test "target record" \ + ".*=record-started,thread-group=\"i${decimal}\".*\\^done" \ + "target record" + +return 0 diff --git a/gdb/testsuite/gdb.mi/mi-reverse.exp b/gdb/testsuite/gdb.mi/mi-reverse.exp index f65493d..974a095 100644 --- a/gdb/testsuite/gdb.mi/mi-reverse.exp +++ b/gdb/testsuite/gdb.mi/mi-reverse.exp @@ -51,7 +51,8 @@ mi_run_to_main if [supports_process_record] { # Activate process record/replay if [mi_gdb_test "-interpreter-exec console record" \ - {\^done} "Turn on process record"] { + "=record-started,id=\"1\"\r\n\\^done" \ + "Turn on process record"] { warning "Fail to activate process record/replay, tests in this group will not be performed.\n"; return -1 } |