diff options
author | Sergey Fedorov | 2015-10-13 11:56:27 +0200 |
---|---|---|
committer | Peter Maydell | 2015-10-16 15:48:56 +0200 |
commit | e63a2d4d9ed73e33a0b7483085808048be8bbcb1 (patch) | |
tree | 1caa80587b00510501fba285a7190c98fbc8a356 /target-arm/op_helper.c | |
parent | target-arm: implement arm_debug_target_el() (diff) | |
download | qemu-e63a2d4d9ed73e33a0b7483085808048be8bbcb1.tar.gz qemu-e63a2d4d9ed73e33a0b7483085808048be8bbcb1.tar.xz qemu-e63a2d4d9ed73e33a0b7483085808048be8bbcb1.zip |
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 <serge.fdrv@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-arm/op_helper.c')
-rw-r--r-- | target-arm/op_helper.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c index 1425a1d4bb..67b18c09c3 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)) { |