From 40612000599e52e792d23c998377a0fa429c4036 Mon Sep 17 00:00:00 2001 From: Julian Brown Date: Tue, 7 Feb 2017 18:29:59 +0000 Subject: arm: Correctly handle watchpoints for BE32 CPUs In BE32 mode, sub-word size watchpoints can fail to trigger because the address of the access is adjusted in the opcode helpers before being compared with the watchpoint registers. This patch reverses the address adjustment before performing the comparison with the help of a new CPUClass hook. This version of the patch augments and tidies up comments a little. Signed-off-by: Julian Brown Message-id: caaf64ffc72f6ae183015337b7afdbd4b8989cb6.1484929304.git.julian@codesourcery.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- exec.c | 1 + 1 file changed, 1 insertion(+) (limited to 'exec.c') diff --git a/exec.c b/exec.c index 8b9ed73b15..6fa337b8d8 100644 --- a/exec.c +++ b/exec.c @@ -2115,6 +2115,7 @@ static void check_watchpoint(int offset, int len, MemTxAttrs attrs, int flags) return; } vaddr = (cpu->mem_io_vaddr & TARGET_PAGE_MASK) + offset; + vaddr = cc->adjust_watchpoint_address(cpu, vaddr, len); QTAILQ_FOREACH(wp, &cpu->watchpoints, entry) { if (cpu_watchpoint_address_matches(wp, vaddr, len) && (wp->flags & flags)) { -- cgit v1.2.3-55-g7522