From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18730 invoked by alias); 30 Sep 2014 09:14:43 -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 18719 invoked by uid 89); 30 Sep 2014 09:14:42 -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,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; Tue, 30 Sep 2014 09:14:41 +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 s8U9EOUi026064 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 30 Sep 2014 05:14:25 -0400 Received: from [127.0.0.1] (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 s8U9EKs9023142; Tue, 30 Sep 2014 05:14:21 -0400 Message-ID: <542A746C.5010901@redhat.com> Date: Tue, 30 Sep 2014 09:14: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: Will Deacon , Peter Maydell CC: 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: <20140930085746.GC8075@arm.com> In-Reply-To: <20140930085746.GC8075@arm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-09/txt/msg00875.txt.bz2 On 09/30/2014 09:57 AM, Will Deacon wrote: > On Mon, Sep 29, 2014 at 07:23:05PM +0100, Peter Maydell wrote: >> Joel Brobecker wrote: >>> 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... >> >> Note that the ARMv7 architecture allows watchpoints to >> be implemented as *asynchronous*, in which case what >> you will see is that you take a watchpoint exception >> but it may not fire until after the instruction that >> triggers the watchpoint and possibly several following >> instructions have all finished execution. This may be >> what you are seeing in your hardware tests. > > No you won't; the kernel will swallow the async watchpoint and complain in > dmesg. It doesn't seem to swallow it; only warn. In hw_breakpoint_pending: /* Perform perf callbacks. */ switch (ARM_DSCR_MOE(dscr)) { case ARM_ENTRY_BREAKPOINT: breakpoint_handler(addr, regs); break; case ARM_ENTRY_ASYNC_WATCHPOINT: WARN(1, "Asynchronous watchpoint exception taken. Debugging results may be unreliable\n"); case ARM_ENTRY_SYNC_WATCHPOINT: watchpoint_handler(addr, fsr, regs); break; Note the fallthrough. In any case, GDB has to care about halt mode, jtag, system, etc. debugging, not just Linux. > I'm not aware of any CPU implementations that actually generate these. Thanks. Until we hear a clearer report otherwise, that's what I'll assume going forward. Thanks, Pedro Alves