qcow2: add missing coroutine_fn annotations
[qemu.git] / gdbstub / softmmu.c
blobf208c6cf159f93222a898d377d191074a7fb273b
1 /*
2 * gdb server stub - softmmu specific bits
4 * Debug integration depends on support from the individual
5 * accelerators so most of this involves calling the ops helpers.
7 * Copyright (c) 2022 Linaro Ltd
9 * SPDX-License-Identifier: GPL-2.0-or-later
12 #include "qemu/osdep.h"
13 #include "exec/gdbstub.h"
14 #include "exec/hwaddr.h"
15 #include "sysemu/cpus.h"
16 #include "internals.h"
18 bool gdb_supports_guest_debug(void)
20 const AccelOpsClass *ops = cpus_get_accel();
21 if (ops->supports_guest_debug) {
22 return ops->supports_guest_debug();
24 return false;
27 int gdb_breakpoint_insert(CPUState *cs, int type, hwaddr addr, hwaddr len)
29 const AccelOpsClass *ops = cpus_get_accel();
30 if (ops->insert_breakpoint) {
31 return ops->insert_breakpoint(cs, type, addr, len);
33 return -ENOSYS;
36 int gdb_breakpoint_remove(CPUState *cs, int type, hwaddr addr, hwaddr len)
38 const AccelOpsClass *ops = cpus_get_accel();
39 if (ops->remove_breakpoint) {
40 return ops->remove_breakpoint(cs, type, addr, len);
42 return -ENOSYS;
45 void gdb_breakpoint_remove_all(CPUState *cs)
47 const AccelOpsClass *ops = cpus_get_accel();
48 if (ops->remove_all_breakpoints) {
49 ops->remove_all_breakpoints(cs);