From patchwork Fri Sep 26 00:39:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 2982 Received: (qmail 12188 invoked by alias); 26 Sep 2014 00:39:59 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 12119 invoked by uid 89); 26 Sep 2014 00:39:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 26 Sep 2014 00:39:58 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8Q0dukl000541 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 25 Sep 2014 20:39:56 -0400 Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s8Q0dgFH019425 for ; Thu, 25 Sep 2014 20:39:56 -0400 From: Pedro Alves 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 01:39:42 +0100 Message-Id: <1411691982-10744-10-git-send-email-palves@redhat.com> In-Reply-To: <1411691982-10744-1-git-send-email-palves@redhat.com> References: <1411691982-10744-1-git-send-email-palves@redhat.com> This finally reverts this bit of commit 929dfd4f: 2009-07-31 Pedro Alves Julian Brown ... (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 * 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) {