From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13425 invoked by alias); 18 Sep 2014 11:40:38 -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 13416 invoked by uid 89); 18 Sep 2014 11:40:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vc0-f171.google.com Received: from mail-vc0-f171.google.com (HELO mail-vc0-f171.google.com) (209.85.220.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 18 Sep 2014 11:40:36 +0000 Received: by mail-vc0-f171.google.com with SMTP id lf12so200817vcb.16 for ; Thu, 18 Sep 2014 04:40:34 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.220.105.148 with SMTP id t20mr521302vco.11.1411040434026; Thu, 18 Sep 2014 04:40:34 -0700 (PDT) Received: by 10.52.253.33 with HTTP; Thu, 18 Sep 2014 04:40:33 -0700 (PDT) In-Reply-To: <5418556E.7010502@redhat.com> 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> Date: Thu, 18 Sep 2014 11:40:00 -0000 Message-ID: Subject: Re: [RFA/commit] arm-tdep.c: Do not single-step after hitting a watchpoint. From: Marcus Shawcroft To: Pedro Alves Cc: Terry Guo , Marcus Shawcroft , lgustavo@codesourcery.com, Joel Brobecker , Yao Qi , "gdb-patches@sourceware.org" , Will Deacon , peter.maydell@arm.com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg00618.txt.bz2 On 16 September 2014 16:21, Pedro Alves wrote: > Hi Terry, Marcus, > > Can someone at ARM shed some light on this, please? > > This thread is here: > > https://sourceware.org/ml/gdb-patches/2014-09/msg00498.html > > And the discussion started in another thread here: > > https://sourceware.org/ml/gdb/2014-09/msg00000.html > > I've just added a test that hopefully helps with this, btw: > > https://sourceware.org/ml/gdb-patches/2014-09/msg00535.html > > I'm also wondering whether Aarch64 needs adjustment as well. > > Thanks, > Pedro Alves Hi, In aarch32 execution state a watch point event is taken as a data abort with the PC containing the address of the faulting instruction + 8 irrespective of thumb mode. The linux kernel adjusts the reported PC by subtracting 8 such that the ptrace interface will indicate the address of the faulting instruction. Peter Maydell's proposed qemu patch referenced in the thread above appears to me to align the gdbstub behaviour in qemu with the linux kernel ptrace() interface behaviour. w.r.t DBGWFAR, it's use is described as deprecated in ARM ARMv7-A&R Issue C.c c11.11.45. It is not used by linux kernel. Cheers /Marcus