[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] target-arm: Fix arm_debug_excp_handler() for si
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH] target-arm: Fix arm_debug_excp_handler() for singlestep enabled |
Date: |
Mon, 2 Nov 2015 18:28:38 +0000 |
On 2 November 2015 at 17:51, Sergey Fedorov <address@hidden> wrote:
> CPU singlestep is done by generating a debug internal exception. Do not
> raise a real CPU exception in case of singlestepping.
>
> Signed-off-by: Sergey Fedorov <address@hidden>
> ---
> target-arm/op_helper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c
> index 7929c71..67d9ffb 100644
> --- a/target-arm/op_helper.c
> +++ b/target-arm/op_helper.c
> @@ -909,7 +909,7 @@ void arm_debug_excp_handler(CPUState *cs)
> uint64_t pc = is_a64(env) ? env->pc : env->regs[15];
> bool same_el = (arm_debug_target_el(env) == arm_current_el(env));
>
> - if (cpu_breakpoint_test(cs, pc, BP_GDB)) {
> + if (cs->singlestep_enabled || cpu_breakpoint_test(cs, pc, BP_GDB)) {
> return;
> }
So I think this will mean that if we're gdbstub-single-stepping then
an architectural breakpoint on the insn we're stepping won't fire.
Does using a test
if (!cpu_breakpoint_test(cs, pc, BP_CPU)) {
return;
}
fix the singlestep bug too? If so I think it would probably be
preferable.
thanks
-- PMM