mirror of
https://github.com/qemu/qemu.git
synced 2024-11-26 04:13:39 +08:00
e22a25c936
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 Changes in this version: - use generic hook cpu_synchronize_state to transfer registers between user space and kvm - push kvm_sw_breakpoints into KVMState Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6825 c046a42c-6fe2-441c-8c8c-71466251a162
36 lines
1.1 KiB
C
36 lines
1.1 KiB
C
#ifndef GDBSTUB_H
|
|
#define GDBSTUB_H
|
|
|
|
#define DEFAULT_GDBSTUB_PORT "1234"
|
|
|
|
/* GDB breakpoint/watchpoint types */
|
|
#define GDB_BREAKPOINT_SW 0
|
|
#define GDB_BREAKPOINT_HW 1
|
|
#define GDB_WATCHPOINT_WRITE 2
|
|
#define GDB_WATCHPOINT_READ 3
|
|
#define GDB_WATCHPOINT_ACCESS 4
|
|
|
|
typedef void (*gdb_syscall_complete_cb)(CPUState *env,
|
|
target_ulong ret, target_ulong err);
|
|
|
|
void gdb_do_syscall(gdb_syscall_complete_cb cb, const char *fmt, ...);
|
|
int use_gdb_syscalls(void);
|
|
void gdb_set_stop_cpu(CPUState *env);
|
|
#ifdef CONFIG_USER_ONLY
|
|
int gdb_queuesig (void);
|
|
int gdb_handlesig (CPUState *, int);
|
|
void gdb_exit(CPUState *, int);
|
|
void gdb_signalled(CPUState *, int);
|
|
int gdbserver_start(int);
|
|
void gdbserver_fork(CPUState *);
|
|
#else
|
|
int gdbserver_start(const char *port);
|
|
#endif
|
|
/* Get or set a register. Returns the size of the register. */
|
|
typedef int (*gdb_reg_cb)(CPUState *env, uint8_t *buf, int reg);
|
|
void gdb_register_coprocessor(CPUState *env,
|
|
gdb_reg_cb get_reg, gdb_reg_cb set_reg,
|
|
int num_regs, const char *xml, int g_pos);
|
|
|
|
#endif
|