From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7150 invoked by alias); 29 Sep 2014 21:04:29 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 7140 invoked by uid 89); 29 Sep 2014 21:04:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_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; Mon, 29 Sep 2014 21:04:28 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8TL4GHr014054 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 29 Sep 2014 17:04:16 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s8TL4BVb028420; Mon, 29 Sep 2014 17:04:12 -0400 Message-ID: <5429C94B.20209@redhat.com> Date: Mon, 29 Sep 2014 21:04:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: Joel Brobecker CC: Marcus Shawcroft , Terry Guo , Marcus Shawcroft , lgustavo@codesourcery.com, Yao Qi , "gdb-patches@sourceware.org" , Will Deacon , peter.maydell@arm.com, "gareth@blacksphere.co.nz >> Gareth McMullin" Subject: Re: [RFA/commit] arm-tdep.c: Do not single-step after hitting a watchpoint. References: <1410786062-19274-1-git-send-email-brobecker@adacore.com> <87bnqf2578.fsf@codesourcery.com> <20140916115936.GM4871@adacore.com> <5418279A.1040604@codesourcery.com> <20140916124814.GO4871@adacore.com> <54183681.3010504@codesourcery.com> <5418556E.7010502@redhat.com> <541C6860.9070907@redhat.com> <20140929175151.GC6927@adacore.com> In-Reply-To: <20140929175151.GC6927@adacore.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-09/txt/msg00853.txt.bz2 On 09/29/2014 06:51 PM, Joel Brobecker wrote: > Hello all, > >> Hmm. So when the data abort triggers at fault+8, the instruction >> that triggered the abort hasn't actually completed, right? No memory >> has changed yet. >> >> So if nothing does the adjustment, like Gareth found out happens with >> the Black Magic Probe, then we'll resume execution from the >> wrong address/instruction (with the effects of the skipped instructions >> missing, including the memory write...). Did I understand that >> right? (Gareth, is that what you see?) > > I have been trying to understand the various contributions, and > I admit I am still not quite sure... > > Does it look like the patch I proposed is correct? It seems to be > supported by Terry Guo's experiments as well... Nope, Terry's experiments supported the current code. The experiments (which were on Linux) showed that the watchpoint was reported to GDB first with the PC pointing at the instruction that accessed memory, and then GDB single-stepped once, and the PC ends up pointing at one instruction after the instruction that changed memory. Thanks, Pedro Alves