From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23408 invoked by alias); 29 Sep 2014 17:57:22 -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 23325 invoked by uid 89); 29 Sep 2014 17:57:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 29 Sep 2014 17:57:19 +0000 Received: from svr-orw-fem-03.mgc.mentorg.com ([147.34.97.39]) by relay1.mentorg.com with esmtp id 1XYfCF-0003fu-4n from Luis_Gustavo@mentor.com ; Mon, 29 Sep 2014 10:57:15 -0700 Received: from [172.30.12.34] (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.3.181.6; Mon, 29 Sep 2014 10:57:14 -0700 Message-ID: <54299D76.7010107@codesourcery.com> Date: Mon, 29 Sep 2014 17:57:00 -0000 From: Luis Machado Reply-To: User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Joel Brobecker , Pedro Alves CC: Marcus Shawcroft , Terry Guo , Marcus Shawcroft , Yao Qi , "gdb-patches@sourceware.org" , Will Deacon , , "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="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg00844.txt.bz2 On 09/29/2014 02: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... > > Thanks! > From previous mails, it does not seem to be correct for Linux, where the ptrace interface adjusts the data fault address to point to the address of the instruction that caused the trigger. So it looks like the current behavior of GDB is correct for Linux, though it may not be correct for QEMU or bare metal. Luis