]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
btrace-btrace: signal record-goto stop
authorMarkus Metzger <markus.t.metzger@intel.com>
Fri, 10 Jun 2016 12:13:02 +0000 (14:13 +0200)
committerMarkus Metzger <markus.t.metzger@intel.com>
Wed, 6 Jul 2016 06:31:22 +0000 (08:31 +0200)
When changing a thread's replay position, call record_signal_goto_stop instead
of printing the source location directly.  This will signal the stop to
front-ends and have them print the source location.

We update the STOP_PC if the change affects the selected thread.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
gdb/
* record-btrace.c (record_btrace_set_replay): Check ptid before updating
STOP_PC.  Call record_signal_goto_stop.

Change-Id: If2cb2b9572396a2e5475d6611c7e9f79547c6f61

gdb/record-btrace.c

index 80d9f04a5e1c5c73f0adfa3630dd77b38757d22d..1998e43fcd05c2465e5478fa07875892a43fd4d9 100644 (file)
@@ -2724,8 +2724,12 @@ record_btrace_set_replay (struct thread_info *tp,
   /* Start anew from the new replay position.  */
   record_btrace_clear_histories (btinfo);
 
-  stop_pc = regcache_read_pc (get_current_regcache ());
-  print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC, 1);
+  /* We changed the PC of TP.  Update the global state if TP is the selected
+     thread.  */
+  if (ptid_equal (tp->ptid, inferior_ptid))
+    stop_pc = regcache_read_pc (get_current_regcache ());
+
+  record_signal_goto_stop (tp);
 }
 
 /* The to_goto_record_begin method of target record-btrace.  */