From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18570 invoked by alias); 30 Sep 2014 10:38:14 -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 18555 invoked by uid 89); 30 Sep 2014 10:38:12 -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; Tue, 30 Sep 2014 10:38:09 +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 s8UAbuTW020875 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 30 Sep 2014 06:37:56 -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 s8UAbr78009205; Tue, 30 Sep 2014 06:37:54 -0400 Message-ID: <542A8801.8040703@redhat.com> Date: Tue, 30 Sep 2014 10:38: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: Peter Maydell CC: Will Deacon , Joel Brobecker , Marcus Shawcroft , Terry Guo , Marcus Shawcroft , "lgustavo@codesourcery.com" , "yao@codesourcery.com" , "gdb-patches@sourceware.org" , "Gareth, McMullin" Subject: Re: [RFA/commit] arm-tdep.c: Do not single-step after hitting a watchpoint References: <5429D9FC.6000509@redhat.com> <542A72F9.5090203@redhat.com> <20140930091824.GE8075@arm.com> <542A80D9.20104@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2014-09/txt/msg00882.txt.bz2 On 09/30/2014 11:17 AM, Peter Maydell wrote: > On 30 September 2014 11:07, Pedro Alves wrote: >> WFAR - Watchpoint Fault Address Register >> >> The WFAR is updated to indicate the address of the instruction that >> accessed the watchpointed address: >> >> - the address of the instruction + 8 in ARM state >> - the address of the instruction + 4 in Thumb® state >> >> What wasn't clear to me was whether this meant that the >> instruction at the address of the instruction, and >> at the the address of the instruction +4/+2 (ARM/Thumb) had >> executed completely or not. It's my understanding now that, >> yes, both the instruction that caused the watchpoint and the >> instruction after that one have already been executed. > > No, you are misinterpreting this. The WFAR records > the address of the offending instruction + an offset > which you have to correct for. The offset does *not* > have any relation to how many further instructions > the CPU has executed after the offending instruction, > which could be none, one, two or ten. Asynchronous > watchpoints are *asynchronous*, which means there > is no timing guarantee about how soon the CPU will > notice that one has fired and stop executing insns. > The only guarantee you get in v7 is that you'll get > the watchpoint before any exception that might be > caused by a following instruction. OK. It's clear now. Thanks you! Pedro Alves