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/gdbstub.h"
13 #include "hw/core/cpu.h"
14 #include "internals.h"
16 bool gdb_supports_guest_debug(void)
18 /* user-mode == TCG == supported */
22 int gdb_breakpoint_insert(CPUState
*cs
, int type
, vaddr addr
, vaddr len
)
28 case GDB_BREAKPOINT_SW
:
29 case GDB_BREAKPOINT_HW
:
31 err
= cpu_breakpoint_insert(cpu
, addr
, BP_GDB
, NULL
);
38 /* user-mode doesn't support watchpoints */
43 int gdb_breakpoint_remove(CPUState
*cs
, int type
, vaddr addr
, vaddr len
)
49 case GDB_BREAKPOINT_SW
:
50 case GDB_BREAKPOINT_HW
:
52 err
= cpu_breakpoint_remove(cpu
, addr
, BP_GDB
);
59 /* user-mode doesn't support watchpoints */
64 void gdb_breakpoint_remove_all(CPUState
*cs
)
66 cpu_breakpoint_remove_all(cs
, BP_GDB
);