]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
record-full: signal record-goto stop
authorMarkus Metzger <markus.t.metzger@intel.com>
Mon, 13 Jun 2016 08:50:26 +0000 (10:50 +0200)
committerMarkus Metzger <markus.t.metzger@intel.com>
Wed, 6 Jul 2016 06:31:22 +0000 (08:31 +0200)
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.

Signed-off-by: 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.

Change-Id: Ibae2736eb0cd3c70ba7d99d18836575eb0d23f33

gdb/record-full.c
gdb/testsuite/gdb.mi/mi-reverse.exp

index 0f61bcb69d619fed739a534640720734432f9214..e875d97154aa7494a723865e77eb601e509d91c1 100644 (file)
@@ -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.  */
index 5afeececb68ee8633711f2a39c5688747644b4d7..0fa8f8fd5e75d3c871f2f28cf8d600bc9169f630 100644 (file)
@@ -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