]> git.proxmox.com Git - mirror_qemu.git/blame - include/exec/gdbstub.h
exec-all: Widen tb_page_addr_t for user-only
[mirror_qemu.git] / include / exec / gdbstub.h
CommitLineData
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
5ef0317f 13
56aebc89 14/* Get or set a register. Returns the size of the register. */
a010bdbe
AB
15typedef int (*gdb_get_reg_cb)(CPUArchState *env, GByteArray *buf, int reg);
16typedef int (*gdb_set_reg_cb)(CPUArchState *env, uint8_t *buf, int reg);
22169d41 17void gdb_register_coprocessor(CPUState *cpu,
a010bdbe 18 gdb_get_reg_cb get_reg, gdb_set_reg_cb set_reg,
56aebc89 19 int num_regs, const char *xml, int g_pos);
1fddef4b 20
fcedd920
AB
21/**
22 * gdbserver_start: start the gdb server
23 * @port_or_device: connection spec for gdb
24 *
25 * For CONFIG_USER this is either a tcp port or a path to a fifo. For
26 * system emulation you can use a full chardev spec for your gdbserver
27 * port.
28 */
29int gdbserver_start(const char *port_or_device);
1c14f162 30
e52fc5e1
PMD
31void gdb_set_stop_cpu(CPUState *cpu);
32
5b50e790
AF
33/**
34 * gdb_has_xml:
35 * This is an ugly hack to cope with both new and old gdb.
36 * If gdb sends qXfer:features:read then assume we're talking to a newish
37 * gdb that understands target descriptions.
38 */
39extern bool gdb_has_xml;
40
4c3b5a48 41/* in gdbstub-xml.c, generated by scripts/feature_to_c.sh */
0b65b9e1
BS
42extern const char *const xml_builtin[][2];
43
1c14f162 44#endif