]>
Commit | Line | Data |
---|---|---|
1fddef4b FB |
1 | #ifndef GDBSTUB_H |
2 | #define GDBSTUB_H | |
3 | ||
cfc3475a | 4 | #define DEFAULT_GDBSTUB_PORT "1234" |
1fddef4b | 5 | |
e22a25c9 AL |
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 | ||
1c14f162 | 13 | #ifdef NEED_CPU_H |
9349b4f9 | 14 | typedef void (*gdb_syscall_complete_cb)(CPUArchState *env, |
a2d1ebaf PB |
15 | target_ulong ret, target_ulong err); |
16 | ||
7ccfb2eb | 17 | void gdb_do_syscall(gdb_syscall_complete_cb cb, const char *fmt, ...); |
a2d1ebaf | 18 | int use_gdb_syscalls(void); |
9349b4f9 AF |
19 | void gdb_set_stop_cpu(CPUArchState *env); |
20 | void gdb_exit(CPUArchState *, int); | |
1fddef4b | 21 | #ifdef CONFIG_USER_ONLY |
ca587a8e | 22 | int gdb_queuesig (void); |
9349b4f9 AF |
23 | int gdb_handlesig (CPUArchState *, int); |
24 | void gdb_signalled(CPUArchState *, int); | |
25 | void gdbserver_fork(CPUArchState *); | |
4046d913 | 26 | #endif |
56aebc89 | 27 | /* Get or set a register. Returns the size of the register. */ |
9349b4f9 AF |
28 | typedef int (*gdb_reg_cb)(CPUArchState *env, uint8_t *buf, int reg); |
29 | void gdb_register_coprocessor(CPUArchState *env, | |
56aebc89 PB |
30 | gdb_reg_cb get_reg, gdb_reg_cb set_reg, |
31 | int num_regs, const char *xml, int g_pos); | |
1fddef4b | 32 | |
68f4730c WC |
33 | static inline int cpu_index(CPUArchState *env) |
34 | { | |
35 | #if defined(CONFIG_USER_ONLY) && defined(CONFIG_USE_NPTL) | |
36 | return env->host_tid; | |
37 | #else | |
38 | return env->cpu_index + 1; | |
39 | #endif | |
40 | } | |
41 | ||
1fddef4b | 42 | #endif |
1c14f162 BS |
43 | |
44 | #ifdef CONFIG_USER_ONLY | |
45 | int gdbserver_start(int); | |
46 | #else | |
47 | int gdbserver_start(const char *port); | |
48 | #endif | |
49 | ||
4c3b5a48 | 50 | /* in gdbstub-xml.c, generated by scripts/feature_to_c.sh */ |
0b65b9e1 BS |
51 | extern const char *const xml_builtin[][2]; |
52 | ||
1c14f162 | 53 | #endif |