1 #ifndef GDBSTUB_H 2 #define GDBSTUB_H 3 4 #define DEFAULT_GDBSTUB_PORT "1234" 5 6 /* GDB breakpoint/watchpoint types */ 7 #define GDB_BREAKPOINT_SW 0 8 #define GDB_BREAKPOINT_HW 1 9 #define GDB_WATCHPOINT_WRITE 2 10 #define GDB_WATCHPOINT_READ 3 11 #define GDB_WATCHPOINT_ACCESS 4 12 13 #ifdef NEED_CPU_H 14 #include "cpu.h" 15 16 typedef void (*gdb_syscall_complete_cb)(CPUState *env, 17 target_ulong ret, target_ulong err); 18 19 void gdb_do_syscall(gdb_syscall_complete_cb cb, const char *fmt, ...); 20 int use_gdb_syscalls(void); 21 void gdb_set_stop_cpu(CPUState *env); 22 void gdb_exit(CPUArchState *, int); 23 #ifdef CONFIG_USER_ONLY 24 int gdb_queuesig (void); 25 int gdb_handlesig (CPUState *, int); 26 void gdb_signalled(CPUArchState *, int); 27 void gdbserver_fork(CPUArchState *); 28 #endif 29 /* Get or set a register. Returns the size of the register. */ 30 typedef int (*gdb_reg_cb)(CPUArchState *env, uint8_t *buf, int reg); 31 void gdb_register_coprocessor(CPUState *cpu, 32 gdb_reg_cb get_reg, gdb_reg_cb set_reg, 33 int num_regs, const char *xml, int g_pos); 34 35 #endif 36 37 #ifdef CONFIG_USER_ONLY 38 int gdbserver_start(int); 39 #else 40 int gdbserver_start(const char *port); 41 #endif 42 43 #endif 44