]>
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 | ||
956af7da AO |
13 | typedef struct GDBFeature { |
14 | const char *xmlname; | |
15 | const char *xml; | |
16 | } GDBFeature; | |
17 | ||
5ef0317f | 18 | |
56aebc89 | 19 | /* Get or set a register. Returns the size of the register. */ |
a010bdbe AB |
20 | typedef int (*gdb_get_reg_cb)(CPUArchState *env, GByteArray *buf, int reg); |
21 | typedef int (*gdb_set_reg_cb)(CPUArchState *env, uint8_t *buf, int reg); | |
8dd7a4b3 AB |
22 | |
23 | /** | |
24 | * gdb_register_coprocessor() - register a supplemental set of registers | |
25 | * @cpu - the CPU associated with registers | |
26 | * @get_reg - get function (gdb reading) | |
27 | * @set_reg - set function (gdb modifying) | |
28 | * @num_regs - number of registers in set | |
29 | * @xml - xml name of set | |
30 | * @gpos - non-zero to append to "general" register set at @gpos | |
31 | */ | |
22169d41 | 32 | void gdb_register_coprocessor(CPUState *cpu, |
a010bdbe | 33 | gdb_get_reg_cb get_reg, gdb_set_reg_cb set_reg, |
56aebc89 | 34 | int num_regs, const char *xml, int g_pos); |
1fddef4b | 35 | |
fcedd920 AB |
36 | /** |
37 | * gdbserver_start: start the gdb server | |
38 | * @port_or_device: connection spec for gdb | |
39 | * | |
40 | * For CONFIG_USER this is either a tcp port or a path to a fifo. For | |
41 | * system emulation you can use a full chardev spec for your gdbserver | |
42 | * port. | |
43 | */ | |
44 | int gdbserver_start(const char *port_or_device); | |
1c14f162 | 45 | |
e52fc5e1 PMD |
46 | void gdb_set_stop_cpu(CPUState *cpu); |
47 | ||
5b50e790 | 48 | /** |
d0e5fa84 AB |
49 | * gdb_has_xml() - report of gdb supports modern target descriptions |
50 | * | |
51 | * This will report true if the gdb negotiated qXfer:features:read | |
52 | * target descriptions. | |
5b50e790 | 53 | */ |
d0e5fa84 | 54 | bool gdb_has_xml(void); |
5b50e790 | 55 | |
956af7da AO |
56 | /* in gdbstub-xml.c, generated by scripts/feature_to_c.py */ |
57 | extern const GDBFeature gdb_static_features[]; | |
0b65b9e1 | 58 | |
1c14f162 | 59 | #endif |