aboutsummaryrefslogtreecommitdiff
path: root/target/arm/debug_helper.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-07-19 08:19:26 -1000
committerRichard Henderson <richard.henderson@linaro.org>2021-07-21 07:47:04 -1000
commitb00d86bc8bfe54fd9e4343cfa1f77fbbcbe32d95 (patch)
treef19c0812d271e5d7d6dfd75c73b4405e25ff64a9 /target/arm/debug_helper.c
parente3f7c801f1b21b01066c5293f7659f1054c4d63b (diff)
target/arm: Implement debug_check_breakpoint
Reuse the code at the bottom of helper_check_breakpoints, which is what we currently call from *_tr_breakpoint_check. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/arm/debug_helper.c')
-rw-r--r--target/arm/debug_helper.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/target/arm/debug_helper.c b/target/arm/debug_helper.c
index 2ff72d47d1..4a0c479527 100644
--- a/target/arm/debug_helper.c
+++ b/target/arm/debug_helper.c
@@ -216,8 +216,9 @@ static bool check_watchpoints(ARMCPU *cpu)
return false;
}
-static bool check_breakpoints(ARMCPU *cpu)
+bool arm_debug_check_breakpoint(CPUState *cs)
{
+ ARMCPU *cpu = ARM_CPU(cs);
CPUARMState *env = &cpu->env;
int n;
@@ -240,9 +241,7 @@ static bool check_breakpoints(ARMCPU *cpu)
void HELPER(check_breakpoints)(CPUARMState *env)
{
- ARMCPU *cpu = env_archcpu(env);
-
- if (check_breakpoints(cpu)) {
+ if (arm_debug_check_breakpoint(env_cpu(env))) {
HELPER(exception_internal(env, EXCP_DEBUG));
}
}