Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Gareth McMullin <gareth@blacksphere.co.nz>,
	       Joel Brobecker <brobecker@adacore.com>
Cc: gdb@sourceware.org
Subject: Re: question about ARM watchpoints
Date: Fri, 05 Sep 2014 00:28:00 -0000	[thread overview]
Message-ID: <540903B0.3000009@redhat.com> (raw)
In-Reply-To: <CAL8qUbqTyBAkrXnN=DxmL5d3h5nwnfv=dO-vDdqxB+kVrZNzSQ@mail.gmail.com>

On 09/04/2014 11:36 PM, Gareth McMullin wrote:
> Hi
> 
> On Mon, Sep 1, 2014 at 8:57 PM, Joel Brobecker <brobecker@adacore.com> 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.

So sounds like this line should be skipped on ARMv7-M:

  arm-tdep.c:  set_gdbarch_have_nonsteppable_watchpoint (gdbarch, 1);

Could you try removing it?

But then I wonder why we never heard of this before.  Are there
ARMv7-M's that behave differently?  And what about ARMv6-M ?

Thanks,
Pedro Alves


  reply	other threads:[~2014-09-05  0:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-01  8:57 Joel Brobecker
2014-09-04 22:37 ` Gareth McMullin
2014-09-05  0:28   ` Pedro Alves [this message]
2014-09-05  3:51     ` Joel Brobecker
2014-09-05  8:17       ` Pedro Alves
2014-09-05  9:46         ` Pedro Alves
2014-09-16 11:18           ` Pedro Alves
2014-09-16 12:13             ` Joel Brobecker
2014-09-16 13:21               ` Pedro Alves
     [not found]       ` <87ioktav6i.fsf@codesourcery.com>
2014-09-15 13:02         ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=540903B0.3000009@redhat.com \
    --to=palves@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=gareth@blacksphere.co.nz \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox