diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2015-12-17 13:37:15 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-12-17 13:37:15 +0000 |
commit | 2ecb2027bc5033dfa92d00d708723053f9689564 (patch) | |
tree | b1a2cbd521d3646c6729572f125d2b8bbf89373f /target-arm/kvm_arm.h | |
parent | 29eb3d9a911b13e2a66413ba5cc6c69a0f4a4528 (diff) |
target-arm: kvm - implement software breakpoints
These don't involve messing around with debug registers, just setting
the breakpoint instruction in memory. GDB will not use this mechanism if
it can't access the memory to write the breakpoint.
All the kernel has to do is ensure the hypervisor traps the breakpoint
exceptions and returns to userspace.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 1449599553-24713-3-git-send-email-alex.bennee@linaro.org
[PMM: Fixed typo in comment]
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-arm/kvm_arm.h')
-rw-r--r-- | target-arm/kvm_arm.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/target-arm/kvm_arm.h b/target-arm/kvm_arm.h index b516041779..fde5d30564 100644 --- a/target-arm/kvm_arm.h +++ b/target-arm/kvm_arm.h @@ -215,4 +215,13 @@ static inline const char *gic_class_name(void) */ const char *gicv3_class_name(void); +/** + * kvm_arm_handle_debug: + * @cs: CPUState + * @debug_exit: debug part of the KVM exit structure + * + * Returns: TRUE if the debug exception was handled. + */ +bool kvm_arm_handle_debug(CPUState *cs, struct kvm_debug_exit_arch *debug_exit); + #endif |