#include "qemu/accel.h"
#include "exec/cpu-common.h"
+#include "gdbstub/enums.h"
/*
* Most "large" transfers (e.g. memory reads, feature XML
* Break/Watch point support - there is an implementation for system
* and user mode.
*/
-int gdb_breakpoint_insert(CPUState *cs, int type, vaddr addr, vaddr len);
-int gdb_breakpoint_remove(CPUState *cs, int type, vaddr addr, vaddr len);
+int gdb_breakpoint_insert(CPUState *cs, GdbBreakpointType type,
+ vaddr addr, vaddr len);
+int gdb_breakpoint_remove(CPUState *cs, GdbBreakpointType type,
+ vaddr addr, vaddr len);
void gdb_breakpoint_remove_all(CPUState *cs);
/**
* Break/Watch point helpers
*/
-int gdb_breakpoint_insert(CPUState *cs, int type, vaddr addr, vaddr len)
+int gdb_breakpoint_insert(CPUState *cs, GdbBreakpointType type,
+ vaddr addr, vaddr len)
{
const AccelOpsClass *ops = cpus_get_accel();
if (ops->insert_breakpoint) {
return -ENOSYS;
}
-int gdb_breakpoint_remove(CPUState *cs, int type, vaddr addr, vaddr len)
+int gdb_breakpoint_remove(CPUState *cs, GdbBreakpointType type,
+ vaddr addr, vaddr len)
{
const AccelOpsClass *ops = cpus_get_accel();
if (ops->remove_breakpoint) {
* Break/Watch point helpers
*/
-int gdb_breakpoint_insert(CPUState *cs, int type, vaddr addr, vaddr len)
+int gdb_breakpoint_insert(CPUState *cs, GdbBreakpointType type,
+ vaddr addr, vaddr len)
{
CPUState *cpu;
int err = 0;
}
}
-int gdb_breakpoint_remove(CPUState *cs, int type, vaddr addr, vaddr len)
+int gdb_breakpoint_remove(CPUState *cs, GdbBreakpointType type,
+ vaddr addr, vaddr len)
{
CPUState *cpu;
int err = 0;
#define DEFAULT_GDBSTUB_PORT "1234"
/* GDB breakpoint/watchpoint types */
-#define GDB_BREAKPOINT_SW 0
-#define GDB_BREAKPOINT_HW 1
-#define GDB_WATCHPOINT_WRITE 2
-#define GDB_WATCHPOINT_READ 3
-#define GDB_WATCHPOINT_ACCESS 4
+typedef enum GdbBreakpointType {
+ GDB_BREAKPOINT_SW = 0,
+ GDB_BREAKPOINT_HW = 1,
+ GDB_WATCHPOINT_WRITE = 2,
+ GDB_WATCHPOINT_READ = 3,
+ GDB_WATCHPOINT_ACCESS = 4,
+} GdbBreakpointType;
#endif /* GDBSTUB_ENUMS_H */