From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5711 invoked by alias); 4 Sep 2014 22:37:26 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 5688 invoked by uid 89); 4 Sep 2014 22:37:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-wg0-f49.google.com Received: from mail-wg0-f49.google.com (HELO mail-wg0-f49.google.com) (74.125.82.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 04 Sep 2014 22:37:22 +0000 Received: by mail-wg0-f49.google.com with SMTP id y10so10953445wgg.32 for ; Thu, 04 Sep 2014 15:37:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=IieCU/CAfx7+a3WDWHs2m+r3pS5h0JJ8ZrjfDR1IZR8=; b=h9ki7EJ0OwXJQT3IiMoce3XyOUeXFS1ulMGgi68tAHNTnP/roaW5wpvVK0awRbyKE8 rd8r6EPWvTLeGoH5L2wwl2SPnquL/hxxJNId0fMHao9dcrW/8h/lCQOD7hYRysPX5CB4 2UM3mafWYXI7Rje1OM6TCU9KclINlaUpyWMLHtPpgr483CJk17nKQBBxmIdq+AHur6Uq xFjpZdgMNpWykGwnDbG7MqeYx9OOnwBTwOS0qW5zExzi1xLGNpuhAQRL9L8HGdtkrb9A Mx/QwrIzBF/b7y5g2olY4e7ngNupw1Bfb+e+1Q8MWQmD5kOG5znosElTCThsHHQHV0Wk Xcxg== X-Gm-Message-State: ALoCoQmwLgpKJ8Wp6xhcNryWLgTggPM2VoxfJ4z+TIn4ECpJHQHN0uWcdaGiX/zs7hvVy1C2QR2Q X-Received: by 10.180.83.129 with SMTP id q1mr9403146wiy.82.1409870238155; Thu, 04 Sep 2014 15:37:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.61.66 with HTTP; Thu, 4 Sep 2014 15:36:58 -0700 (PDT) In-Reply-To: <20140901085743.GG4981@adacore.com> References: <20140901085743.GG4981@adacore.com> From: Gareth McMullin Date: Thu, 04 Sep 2014 22:37:00 -0000 Message-ID: Subject: Re: question about ARM watchpoints To: Joel Brobecker Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg00013.txt.bz2 Hi On Mon, Sep 1, 2014 at 8:57 PM, Joel Brobecker wrote: > Everything works pretty well, except that we noticed that GDB stops > 2 instructions after the variable update, rather than at the next > instruction. I get the same behaviour on the Black Magic Probe on ARMv7-M. The DWT halts the core on the instruction after the address match. > The question then becomes: Is QEMU behaving correctly, in which > case we should be modifying GDB, or is QEMU signaling GDB too > late, in which case we should be fixing QEMU? What QEMU is doing is the same as the hardware DWT block, so I'd say this is the correct behaviour. The fix should be in GDB. Working around this in QEMU would leave all hardware based implementations broken. Regards, Gareth -- Black Sphere Technologies Ltd. Web: www.blacksphere.co.nz Mobile: +64 27 777 2182 Tel: +64 9 478 8885 Skype: gareth.mcmullin LinkedIn: http://nz.linkedin.com/in/gsmcmullin