Move the function to cpu-common.c, with the other breakpoint functions.
Signed-off-by: Richard Henderson <[email protected]>
---
include/hw/core/cpu.h | 17 +----------------
cpu-common.c | 15 +++++++++++++++
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index 2c58ea5e4c..71ed1f17a4 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -1143,22 +1143,7 @@ int cpu_breakpoint_insert(CPUState *cpu, vaddr pc,
BreakpointFlags flags,
int cpu_breakpoint_remove(CPUState *cpu, vaddr pc, BreakpointFlags flags);
void cpu_breakpoint_remove_by_ref(CPUState *cpu, CPUBreakpoint *breakpoint);
void cpu_breakpoint_remove_all(CPUState *cpu, BreakpointFlags mask);
-
-/* Return true if PC matches an installed breakpoint. */
-static inline bool cpu_breakpoint_test(CPUState *cpu, vaddr pc,
- BreakpointFlags mask)
-{
- CPUBreakpoint *bp;
-
- if (unlikely(!QTAILQ_EMPTY(&cpu->breakpoints))) {
- QTAILQ_FOREACH(bp, &cpu->breakpoints, entry) {
- if (bp->pc == pc && (bp->flags & mask)) {
- return true;
- }
- }
- }
- return false;
-}
+bool cpu_breakpoint_test(CPUState *cpu, vaddr pc, BreakpointFlags mask);
/**
* cpu_get_address_space:
diff --git a/cpu-common.c b/cpu-common.c
index bc77835aea..ba2676cbad 100644
--- a/cpu-common.c
+++ b/cpu-common.c
@@ -388,6 +388,21 @@ void process_queued_cpu_work(CPUState *cpu)
qemu_cond_broadcast(&qemu_work_cond);
}
+/* Return true if PC matches an installed breakpoint. */
+bool cpu_breakpoint_test(CPUState *cpu, vaddr pc, BreakpointFlags mask)
+{
+ CPUBreakpoint *bp;
+
+ if (unlikely(!QTAILQ_EMPTY(&cpu->breakpoints))) {
+ QTAILQ_FOREACH(bp, &cpu->breakpoints, entry) {
+ if (bp->pc == pc && (bp->flags & mask)) {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
/* Add a breakpoint. */
int cpu_breakpoint_insert(CPUState *cpu, vaddr pc, BreakpointFlags flags,
CPUBreakpoint **breakpoint)
--
2.43.0