To simplify later #ifdef'ry, move some code around. Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- target/arm/internals.h | 16 ++++++++-------- target/arm/debug_helper.c | 22 +++++++++++----------- 2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/target/arm/internals.h b/target/arm/internals.h index d6ace004855..3fb295431ae 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -278,14 +278,6 @@ void hw_watchpoint_update_all(ARMCPU *cpu); * Update a QEMU breakpoint based on the information the guest has set in the * DBGBCR<n>_EL1 and DBGBVR<n>_EL1 registers. */ -void hw_breakpoint_update(ARMCPU *cpu, int n); -/* - * Update the QEMU breakpoints for every guest breakpoint. This does a - * complete delete-and-reinstate of the QEMU breakpoint list and so is - * suitable for use after migration or on reset. - */ -void hw_breakpoint_update_all(ARMCPU *cpu); - /* Callback function for checking if a watchpoint should trigger. */ bool arm_debug_check_watchpoint(CPUState *cs, CPUWatchpoint *wp); @@ -295,6 +287,14 @@ bool arm_debug_check_watchpoint(CPUState *cs, CPUWatchpoint *wp); */ vaddr arm_adjust_watchpoint_address(CPUState *cs, vaddr addr, int len); +void hw_breakpoint_update(ARMCPU *cpu, int n); +/* + * Update the QEMU breakpoints for every guest breakpoint. This does a + * complete delete-and-reinstate of the QEMU breakpoint list and so is + * suitable for use after migration or on reset. + */ +void hw_breakpoint_update_all(ARMCPU *cpu); + /* Callback function for when a watchpoint or breakpoint triggers. */ void arm_debug_excp_handler(CPUState *cs); diff --git a/target/arm/debug_helper.c b/target/arm/debug_helper.c index 2ff72d47d19..c01d8524443 100644 --- a/target/arm/debug_helper.c +++ b/target/arm/debug_helper.c @@ -216,6 +216,17 @@ static bool check_watchpoints(ARMCPU *cpu) return false; } +bool arm_debug_check_watchpoint(CPUState *cs, CPUWatchpoint *wp) +{ + /* + * Called by core code when a CPU watchpoint fires; need to check if this + * is also an architectural watchpoint match. + */ + ARMCPU *cpu = ARM_CPU(cs); + + return check_watchpoints(cpu); +} + static bool check_breakpoints(ARMCPU *cpu) { CPUARMState *env = &cpu->env; @@ -247,17 +258,6 @@ void HELPER(check_breakpoints)(CPUARMState *env) } } -bool arm_debug_check_watchpoint(CPUState *cs, CPUWatchpoint *wp) -{ - /* - * Called by core code when a CPU watchpoint fires; need to check if this - * is also an architectural watchpoint match. - */ - ARMCPU *cpu = ARM_CPU(cs); - - return check_watchpoints(cpu); -} - void arm_debug_excp_handler(CPUState *cs) { /* -- 2.26.2