]> git.proxmox.com Git - mirror_qemu.git/commit - cpus.c
Rework debug exception processing for gdb use
authorJan Kiszka <jan.kiszka@siemens.com>
Fri, 25 Jun 2010 14:56:56 +0000 (16:56 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Thu, 22 Jul 2010 03:52:09 +0000 (05:52 +0200)
commit3c638d0690a0b21c6acef7ce3132f821d8c1e25d
treef4e76d79462529a9561f48250bad1839b0fc3219
parent472fb0c479cd98e245cce67cb525b1f15d6c1679
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>
cpus.c
kvm-all.c