This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 7/8] btrace-btrace: 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:30 +0200
- Subject: [PATCH 7/8] btrace-btrace: signal record-goto stop
- Authentication-results: sourceware.org; auth=none
- References: <1467806191-4320-1-git-send-email-markus.t.metzger@intel.com>
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.
2016-07-06 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.
---
gdb/record-btrace.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index 80d9f04..1998e43 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -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. */
--
1.8.3.1