blob: 4bfd872f318d75d668f8b5564333067622645a93 [file] [log] [blame]
bellard1fddef42005-04-17 19:16:13 +00001#ifndef GDBSTUB_H
2#define GDBSTUB_H
3
pbrookcfc34752007-02-22 01:48:01 +00004#define DEFAULT_GDBSTUB_PORT "1234"
bellard1fddef42005-04-17 19:16:13 +00005
pbrooka2d1eba2007-01-28 03:10:55 +00006typedef void (*gdb_syscall_complete_cb)(CPUState *env,
7 target_ulong ret, target_ulong err);
8
blueswir17ccfb2e2008-09-14 06:45:34 +00009void gdb_do_syscall(gdb_syscall_complete_cb cb, const char *fmt, ...);
pbrooka2d1eba2007-01-28 03:10:55 +000010int use_gdb_syscalls(void);
aliguori880a7572008-11-18 20:30:24 +000011void gdb_set_stop_cpu(CPUState *env);
bellard1fddef42005-04-17 19:16:13 +000012#ifdef CONFIG_USER_ONLY
13int gdb_handlesig (CPUState *, int);
bellarde9009672005-04-26 20:42:36 +000014void gdb_exit(CPUState *, int);
bellard1fddef42005-04-17 19:16:13 +000015int gdbserver_start(int);
aurel322b1319c2008-12-18 22:44:04 +000016void gdbserver_fork(CPUState *);
pbrook4046d912007-01-28 01:53:16 +000017#else
pbrookcfc34752007-02-22 01:48:01 +000018int gdbserver_start(const char *port);
pbrook4046d912007-01-28 01:53:16 +000019#endif
pbrook56aebc82008-10-11 17:55:29 +000020/* Get or set a register. Returns the size of the register. */
21typedef int (*gdb_reg_cb)(CPUState *env, uint8_t *buf, int reg);
22void gdb_register_coprocessor(CPUState *env,
23 gdb_reg_cb get_reg, gdb_reg_cb set_reg,
24 int num_regs, const char *xml, int g_pos);
bellard1fddef42005-04-17 19:16:13 +000025
26#endif