question about ARM watchpoints

Gareth McMullin gareth@blacksphere.co.nz
Thu Sep 4 22:37:00 GMT 2014


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.

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



More information about the Gdb mailing list