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 "sysemu/cpus.h"
15 #include "internals.h"
17 bool gdb_supports_guest_debug(void)
19 const AccelOpsClass
*ops
= cpus_get_accel();
20 if (ops
->supports_guest_debug
) {
21 return ops
->supports_guest_debug();
26 int gdb_breakpoint_insert(CPUState
*cs
, int type
, vaddr addr
, vaddr len
)
28 const AccelOpsClass
*ops
= cpus_get_accel();
29 if (ops
->insert_breakpoint
) {
30 return ops
->insert_breakpoint(cs
, type
, addr
, len
);
35 int gdb_breakpoint_remove(CPUState
*cs
, int type
, vaddr addr
, vaddr len
)
37 const AccelOpsClass
*ops
= cpus_get_accel();
38 if (ops
->remove_breakpoint
) {
39 return ops
->remove_breakpoint(cs
, type
, addr
, len
);
44 void gdb_breakpoint_remove_all(CPUState
*cs
)
46 const AccelOpsClass
*ops
= cpus_get_accel();
47 if (ops
->remove_all_breakpoints
) {
48 ops
->remove_all_breakpoints(cs
);