gdbstub.h 1.3 KB

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