This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 6/8] record-full: signal record-goto stop
- From: Markus Metzger <markus dot t dot metzger at intel dot com>
- To: gdb-patches at sourceware dot org
- Cc: palves at redhat dot com, marc dot khouzam at ericsson dot com
- Date: Wed, 6 Jul 2016 13:56:29 +0200
- Subject: [PATCH 6/8] record-full: signal record-goto stop
- Authentication-results: sourceware.org; auth=none
- References: <1467806191-4320-1-git-send-email-markus.t.metzger@intel.com>
When changing the replay position call record_signal_goto_stop instead of
printing the new source location directly. This will signal the stop to
front-ends and have them print the source location.
2016-07-06 Markus Metzger <markus.t.metzger@intel.com>
gdb/
* record-full.c (record_full_goto_entry): Call record_signal_goto_stop.
testsuite/
* gdb.mi/mi-reverse.exp: Test record goto begin/end.
---
gdb/record-full.c | 2 +-
gdb/testsuite/gdb.mi/mi-reverse.exp | 9 +++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/gdb/record-full.c b/gdb/record-full.c
index 0f61bcb..e875d97 100644
--- a/gdb/record-full.c
+++ b/gdb/record-full.c
@@ -1905,7 +1905,7 @@ record_full_goto_entry (struct record_full_entry *p)
registers_changed ();
reinit_frame_cache ();
stop_pc = regcache_read_pc (get_current_regcache ());
- print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC, 1);
+ record_signal_goto_stop (inferior_thread ());
}
/* The "to_goto_record_begin" target method. */
diff --git a/gdb/testsuite/gdb.mi/mi-reverse.exp b/gdb/testsuite/gdb.mi/mi-reverse.exp
index 5afeece..0fa8f8f 100644
--- a/gdb/testsuite/gdb.mi/mi-reverse.exp
+++ b/gdb/testsuite/gdb.mi/mi-reverse.exp
@@ -93,6 +93,7 @@ proc test_controlled_execution_reverse {} {
global line_callee1_head line_callee1_body line_callee1_close
global line_main_head line_main_body
global line_main_hello line_main_callme_1
+ global line_callme_body
# Test exec-reverse-finish
@@ -166,6 +167,14 @@ proc test_controlled_execution_reverse {} {
"" "main" "" \
"basics.c" $line_main_body "" \
"reverse-continue at main"
+
+ send_gdb "record goto end\n"
+ mi_expect_stop "" "callme" "\{name=\"i\",value=\"1\"\}" "basics.c" \
+ $line_callme_body { "" "" "\\^done\r\n" } "record goto end"
+
+ send_gdb "record goto begin\n"
+ mi_expect_stop "" "main" "" "basics.c" $line_main_body \
+ { "" "" "\\^done\r\n" } "record goto begin"
}
test_controlled_execution_reverse
--
1.8.3.1