public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Markus Metzger <markus.t.metzger@intel.com>
To: gdb-patches@sourceware.org
Cc: palves@redhat.com, marc.khouzam@ericsson.com
Subject: [PATCH 7/8] btrace-btrace: signal record-goto stop
Date: Wed, 06 Jul 2016 11:57:00 -0000	[thread overview]
Message-ID: <1467806191-4320-8-git-send-email-markus.t.metzger@intel.com> (raw)
In-Reply-To: <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

  parent reply	other threads:[~2016-07-06 11:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-06 11:56 [PATCH 0/8] record: notify about "record goto" stop Markus Metzger
2016-07-06 11:56 ` [PATCH 4/8] record: signal a record goto stop to front-ends Markus Metzger
2016-07-06 11:56 ` [PATCH 2/8] record: do not allow record goto on a running thread Markus Metzger
2016-07-06 11:57 ` [PATCH 1/8] btrace: check if we're replaying when setting the replay position to the end Markus Metzger
2016-07-06 11:57 ` [PATCH 8/8] btrace: record stop moves to the end of the trace Markus Metzger
2016-07-06 11:57 ` Markus Metzger [this message]
2016-07-06 11:57 ` [PATCH 3/8] infrun: export clear_proceed_status_thread Markus Metzger
2016-07-06 11:57 ` [PATCH 5/8] mi, testsuite: add another EXTRA option to mi_expect_stop Markus Metzger
2016-07-06 11:57 ` [PATCH 6/8] record-full: signal record-goto stop Markus Metzger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1467806191-4320-8-git-send-email-markus.t.metzger@intel.com \
    --to=markus.t.metzger@intel.com \
    --cc=gdb-patches@sourceware.org \
    --cc=marc.khouzam@ericsson.com \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).