2 * gdbstub user-mode helper routines.
4 * We know for user-mode we are using TCG so we can call stuff directly.
6 * Copyright (c) 2022 Linaro Ltd
8 * SPDX-License-Identifier: GPL-2.0-or-later
11 #include "qemu/osdep.h"
12 #include "exec/hwaddr.h"
13 #include "exec/gdbstub.h"
14 #include "hw/core/cpu.h"
15 #include "internals.h"
17 bool gdb_supports_guest_debug(void)
19 /* user-mode == TCG == supported */
23 int gdb_breakpoint_insert(CPUState *cs, int type, hwaddr addr, hwaddr len)
29 case GDB_BREAKPOINT_SW:
30 case GDB_BREAKPOINT_HW:
32 err = cpu_breakpoint_insert(cpu, addr, BP_GDB, NULL);
39 /* user-mode doesn't support watchpoints */
44 int gdb_breakpoint_remove(CPUState *cs, int type, hwaddr addr, hwaddr len)
50 case GDB_BREAKPOINT_SW:
51 case GDB_BREAKPOINT_HW:
53 err = cpu_breakpoint_remove(cpu, addr, BP_GDB);
60 /* user-mode doesn't support watchpoints */
65 void gdb_breakpoint_remove_all(CPUState *cs)
67 cpu_breakpoint_remove_all(cs, BP_GDB);