[ Also available via git://git.kiszka.org/qemu.git queue/gdb ]
This is a backport of the guest debugging support for the KVM
accelerator that is now part of the KVM tree. It implements the reworked
KVM kernel API for guest debugging (KVM_CAP_SET_GUEST_DEBUG) which is
not yet part of any mainline kernel but will probably be 2.6.30 stuff.
So far supported is x86, but PPC is expected to catch up soon.
Core features are:
- unlimited soft-breakpoints via code patching
- hardware-assisted x86 breakpoints and watchpoints
Open issues: Writing soft breakpoints to BIOS code. cpu_memory_rw_debug
does not work here. Suggestion to fix this cleanly are welcome.
Signed-off-by: Jan Kiszka <address@hidden>
---
configure | 4 +
exec.c | 10 ++-
gdbstub.c | 29 +++++++--
gdbstub.h | 7 ++
kvm-all.c | 172 +++++++++++++++++++++++++++++++++++++++++++++++++++++
kvm.h | 41 +++++++++++++
target-i386/kvm.c | 172 +++++++++++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 423 insertions(+), 12 deletions(-)
diff --git a/configure b/configure
index a8ea55a..afbe1e0 100755
--- a/configure
+++ b/configure
@@ -479,11 +479,11 @@ case "$cpu" in
ARCH_CFLAGS="-march=z900"
;;
i386)
- ARCH_CFLAGS="-m32"
+ ARCH_CFLAGS="-m32 -DCONFIG_X86"
ARCH_LDFLAGS="-m32"
;;
x86_64)
- ARCH_CFLAGS="-m64"
+ ARCH_CFLAGS="-m64 -DCONFIG_X86"
ARCH_LDFLAGS="-m64"
;;
esac