From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18657 invoked by alias); 30 Sep 2014 14:26:16 -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 18646 invoked by uid 89); 30 Sep 2014 14:26:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 30 Sep 2014 14:26:14 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 20B8111623D; Tue, 30 Sep 2014 10:26:13 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id R1LKHcLyvIs2; Tue, 30 Sep 2014 10:26:13 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 8942B116243; Tue, 30 Sep 2014 10:26:12 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 7BEE0497DA; Tue, 30 Sep 2014 07:26:12 -0700 (PDT) Date: Tue, 30 Sep 2014 14:26:00 -0000 From: Joel Brobecker To: Pedro Alves Cc: Peter Maydell , Marcus Shawcroft , Terry.Guo@arm.com, Marcus Shawcroft , "lgustavo@codesourcery.com" , yao@codesourcery.com, gdb-patches@sourceware.org, Will Deacon , "Gareth, McMullin" Subject: Re: [RFA/commit] arm-tdep.c: Do not single-step after hitting a watchpoint Message-ID: <20140930142612.GE6927@adacore.com> References: <5429D9FC.6000509@redhat.com> <542A72F9.5090203@redhat.com> <542A872B.9050203@redhat.com> <542AA806.10804@redhat.com> <20140930135031.GD6927@adacore.com> <542AB9E3.5090100@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <542AB9E3.5090100@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-09/txt/msg00899.txt.bz2 > I assume that WFAR/DSCR are privileged registers though. > On Linux, for example, they're not exported to userspace. Indeed, I was expecting as much... > > Informing the user about how > > far would certainly be a useful info for the user. The only > > part I'm unclear about is whether it's OK to check WFAR when > > in synchronous mode, and whether it'll have a WFAR=0 in case > > of a synchronous breakpoint... > > I think it'd be better leave those details to the > remote stub / OS though. E.g., this way, qemu's gdbserver > stub may support watchpoint variants that the hardware > qemu is emulating doesn't support. Sure! That's what I meant, and was thinking of our gdbserver implementation. But now that I think this through, of course GDBserver is mostly implemented... on top of an OS! Duh... > For instance, as a natural extension of this, we could > make it possible for qemu to have non-continuable watchpoints > (trap before the instruction that changes memory executes) on all > targets, even x86. Or have it trap after the instruction > that changes memory, but tell GDB the address of the instruction > that triggered the watchpoint (there's no magic number to subtract > on x86, due to variable-length instructions). That's very interesting. When I talked to one of our QEMU developers in house about this, he wasn't even sure if it was possible for QEMU to stop at the instruction triggering the watchpoint. Now, we know it is, but it could be simpler for QEMU to implement the same policy on all targets. -- Joel