diff --git a/qemu/target/arm/helper.c b/qemu/target/arm/helper.c index 51a80191..0de3f701 100644 --- a/qemu/target/arm/helper.c +++ b/qemu/target/arm/helper.c @@ -7162,7 +7162,6 @@ static void arm_cpu_do_interrupt_aarch32_(CPUState *cs) offset = 0; break; case EXCP_BKPT: - env->exception.fsr = 2; /* Fall through to prefetch abort. */ case EXCP_PREFETCH_ABORT: A32_BANKED_CURRENT_REG_SET(env, ifsr, env->exception.fsr); diff --git a/qemu/target/arm/op_helper.c b/qemu/target/arm/op_helper.c index ded7c276..51770dee 100644 --- a/qemu/target/arm/op_helper.c +++ b/qemu/target/arm/op_helper.c @@ -494,6 +494,8 @@ void HELPER(exception_with_syndrome)(CPUARMState *env, uint32_t excp, */ void HELPER(exception_bkpt_insn)(CPUARMState *env, uint32_t syndrome) { + /* FSR will only be used if the debug target EL is AArch32. */ + env->exception.fsr = arm_debug_exception_fsr(env); raise_exception(env, EXCP_BKPT, syndrome, arm_debug_target_el(env)); }