summaryrefslogtreecommitdiffstats
path: root/include/sysemu/accel-ops.h
diff options
context:
space:
mode:
authorAlex Bennée2022-09-29 13:42:24 +0200
committerAlex Bennée2022-10-06 12:53:41 +0200
commitae7467b1ac49e10c548099e9f9c59af895af2d3f (patch)
treea414196a412f105a8787c88230bc6b5f749eb2a3 /include/sysemu/accel-ops.h
parentgdbstub: move sstep flags probing into AccelClass (diff)
downloadqemu-ae7467b1ac49e10c548099e9f9c59af895af2d3f.tar.gz
qemu-ae7467b1ac49e10c548099e9f9c59af895af2d3f.tar.xz
qemu-ae7467b1ac49e10c548099e9f9c59af895af2d3f.zip
gdbstub: move breakpoint logic to accel ops
As HW virtualization requires specific support to handle breakpoints lets push out special casing out of the core gdbstub code and into AccelOpsClass. This will make it easier to add other accelerator support and reduces some of the stub shenanigans. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Mads Ynddal <mads@ynddal.dk> Message-Id: <20220929114231.583801-45-alex.bennee@linaro.org>
Diffstat (limited to 'include/sysemu/accel-ops.h')
-rw-r--r--include/sysemu/accel-ops.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sysemu/accel-ops.h b/include/sysemu/accel-ops.h
index a0572ea87a..86794ac273 100644
--- a/include/sysemu/accel-ops.h
+++ b/include/sysemu/accel-ops.h
@@ -10,6 +10,7 @@
#ifndef ACCEL_OPS_H
#define ACCEL_OPS_H
+#include "exec/hwaddr.h"
#include "qom/object.h"
#define ACCEL_OPS_SUFFIX "-ops"
@@ -44,6 +45,11 @@ struct AccelOpsClass {
int64_t (*get_virtual_clock)(void);
int64_t (*get_elapsed_ticks)(void);
+
+ /* gdbstub hooks */
+ int (*insert_breakpoint)(CPUState *cpu, int type, hwaddr addr, hwaddr len);
+ int (*remove_breakpoint)(CPUState *cpu, int type, hwaddr addr, hwaddr len);
+ void (*remove_all_breakpoints)(CPUState *cpu);
};
#endif /* ACCEL_OPS_H */