Re: question about ARM watchpoints

Pedro Alves <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
On 09/04/2014 11:36 PM, Gareth McMullin wrote:
> Hi
> 
> On Mon, Sep 1, 2014 at 8:57 PM, Joel Brobecker <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.