public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 9/9] Non-stop + software single-step archs: don't force displaced-stepping for all single-steps
Date: Fri, 26 Sep 2014 00:40:00 -0000	[thread overview]
Message-ID: <1411691982-10744-10-git-send-email-palves@redhat.com> (raw)
In-Reply-To: <1411691982-10744-1-git-send-email-palves@redhat.com>

This finally reverts this bit of commit 929dfd4f:

  2009-07-31  Pedro Alves  <pedro@codesourcery.com>
	      Julian Brown  <julian@codesourcery.com>

	 ...
	 (resume): If this is a software single-stepping arch, and
	 displaced-stepping is enabled, use it for all single-step
	 requests.
	 ...

That means that in non-stop (or really displaced-stepping) mode, on
software single-step archs - even those that only use sss breakpoints
to deal with atomic sequences, like PPC - if we have more than one
thread single-stepping, we'll always serialize the threads'
single-steps, as only one thread may be displaced stepping at a given
time, because there's only one scratch pad.

We originally did that because GDB didn't support having multiple
threads software-single-stepping simultaneously.  The previous patches
fixed that limitation, so we can now finally revert this too.

Tested on:

  - x86_64 Fedora 20, on top of the 'software single-step on x86'
    series.
  - PPC64 Fedora 18  (installs gdbarch_software_single_step hook to
    deal with atomic sequences).

gdb/
2014-09-25  Pedro Alves  <palves@redhat.com>

	* infrun.c (resume): Don't force displaced-stepping for all
	single-steps on software single-stepping archs.
---
 gdb/infrun.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gdb/infrun.c b/gdb/infrun.c
index 4ff5b07..e51bc7c 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -1846,8 +1846,7 @@ a command like `return' or `jump' to continue execution."));
      event, displaced stepping breaks the vfork child similarly as single
      step software breakpoint.  */
   if (use_displaced_stepping (gdbarch)
-      && (tp->control.trap_expected
-	  || (step && gdbarch_software_single_step_p (gdbarch)))
+      && tp->control.trap_expected
       && sig == GDB_SIGNAL_0
       && !current_inferior ()->waiting_for_vfork_done)
     {
-- 
1.9.3

  parent reply	other threads:[~2014-09-26  0:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-26  0:39 [PATCH 0/9] software single-step support rework, fix limitations Pedro Alves
2014-09-26  0:39 ` [PATCH 1/9] Decide whether we may have removed breakpoints based on step_over_info Pedro Alves
2014-09-28 12:52   ` Yao Qi
2014-10-02 18:05     ` Pedro Alves
2014-10-06  1:06       ` Yao Qi
2014-10-06  8:42         ` Pedro Alves
2014-09-26  0:39 ` [PATCH 2/9] Rewrite non-continuable watchpoints handling Pedro Alves
2014-09-26  0:40 ` [PATCH 4/9] Remove deprecated_insert_raw_breakpoint and friends Pedro Alves
2014-09-26  0:40 ` [PATCH 3/9] Put single-step breakpoints on the bp_location chain Pedro Alves
2014-09-28 12:36   ` Yao Qi
2014-09-30 13:01     ` Pedro Alves
2014-09-30 13:15       ` Pedro Alves
2014-09-29  6:33   ` Yao Qi
2014-10-02 17:55     ` Pedro Alves
2014-09-26  0:40 ` [PATCH 5/9] Switch back to stepped thread: clear step-over info Pedro Alves
2014-09-30 16:33   ` Pedro Alves
2014-09-26  0:40 ` [PATCH 8/9] Make single-step breakpoints be per-thread Pedro Alves
2014-09-26  0:40 ` Pedro Alves [this message]
2014-09-26  1:18 ` [PATCH 6/9] thread.c: cleanup breakpoint deletion Pedro Alves
2014-09-26  1:36 ` [PATCH 7/9] infrun.c: add for_each_just_stopped_thread Pedro Alves

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=1411691982-10744-10-git-send-email-palves@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /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).