From: Sergey Fedorov Date: Tue, 13 Oct 2015 09:56:27 +0000 (+0300) Subject: target-arm: Fix GDB breakpoint handling X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=e63a2d4d9ed73e33a0b7483085808048be8bbcb1;p=osstest%2Fqemu.git target-arm: Fix GDB breakpoint handling GDB breakpoints have higher priority so they have to be checked first. Should GDB breakpoint match, just return from the debug exception handler. Signed-off-by: Sergey Fedorov Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c index 1425a1d4b..67b18c09c 100644 --- a/target-arm/op_helper.c +++ b/target-arm/op_helper.c @@ -897,6 +897,12 @@ void arm_debug_excp_handler(CPUState *cs) } } } else { + uint64_t pc = is_a64(env) ? env->pc : env->regs[15]; + + if (cpu_breakpoint_test(cs, pc, BP_GDB)) { + return; + } + if (check_breakpoints(cpu)) { bool same_el = (arm_debug_target_el(env) == arm_current_el(env)); if (extended_addresses_enabled(env)) {