diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2010-06-25 16:56:56 +0200 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2010-07-22 05:52:09 +0200 |
commit | 3c638d0690a0b21c6acef7ce3132f821d8c1e25d (patch) | |
tree | f4e76d79462529a9561f48250bad1839b0fc3219 /kvm-all.c | |
parent | 472fb0c479cd98e245cce67cb525b1f15d6c1679 (diff) |
Rework debug exception processing for gdb use
Guest debugging is currently broken under CONFIG_IOTHREAD. The reason is
inconsistent or even lacking signaling the debug events from the source
VCPU to the main loop and the gdbstub.
This patch addresses the issue by pushing this signaling into a
CPUDebugExcpHandler: cpu_debug_handler is registered as first handler,
thus will be executed last after potential breakpoint emulation
handlers. It sets informs the gdbstub about the debug event source,
requests a debug exit of the main loop and stops the current VCPU. This
mechanism works both for TCG and KVM, with and without IO-thread.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'kvm-all.c')
-rw-r--r-- | kvm-all.c | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -924,8 +924,6 @@ int kvm_cpu_exec(CPUState *env) DPRINTF("kvm_exit_debug\n"); #ifdef KVM_CAP_SET_GUEST_DEBUG if (kvm_arch_debug(&run->debug.arch)) { - gdb_set_stop_cpu(env); - vm_stop(EXCP_DEBUG); env->exception_index = EXCP_DEBUG; return 0; } |