Define CPUWatchpoint in "exec/watchpoint.h", including this
header where appropriate.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
---
 include/accel/tcg/cpu-ops.h |  1 +
 include/exec/breakpoint.h   |  9 ---------
 include/exec/watchpoint.h   | 12 ++++++++++++
 target/arm/internals.h      |  1 +
 gdbstub/system.c            |  1 +
 target/arm/hyp_gdbstub.c    |  1 +
 target/i386/kvm/kvm.c       |  1 +
 target/ppc/kvm.c            |  1 +
 target/s390x/kvm/kvm.c      |  1 +
 target/xtensa/helper.c      |  1 +
 10 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/include/accel/tcg/cpu-ops.h b/include/accel/tcg/cpu-ops.h
index 568d82cdd32..d5994781c39 100644
--- a/include/accel/tcg/cpu-ops.h
+++ b/include/accel/tcg/cpu-ops.h
@@ -20,6 +20,7 @@
 #include "exec/memop.h"
 #include "exec/mmu-access-type.h"
 #include "exec/vaddr.h"
+#include "exec/watchpoint.h"
 #include "accel/tcg/tb-cpu-state.h"
 #include "tcg/tcg-mo.h"
 
diff --git a/include/exec/breakpoint.h b/include/exec/breakpoint.h
index 0c3cc0c8ff3..9d0dd89e7c9 100644
--- a/include/exec/breakpoint.h
+++ b/include/exec/breakpoint.h
@@ -33,13 +33,4 @@ typedef struct CPUBreakpoint {
     QTAILQ_ENTRY(CPUBreakpoint) entry;
 } CPUBreakpoint;
 
-typedef struct CPUWatchpoint {
-    vaddr vaddr;
-    vaddr len;
-    vaddr hitaddr;
-    MemTxAttrs hitattrs;
-    int flags; /* BP_* */
-    QTAILQ_ENTRY(CPUWatchpoint) entry;
-} CPUWatchpoint;
-
 #endif
diff --git a/include/exec/watchpoint.h b/include/exec/watchpoint.h
index ba148eff3d1..7b72de35aa5 100644
--- a/include/exec/watchpoint.h
+++ b/include/exec/watchpoint.h
@@ -8,7 +8,19 @@
 #ifndef EXEC_WATCHPOINT_H
 #define EXEC_WATCHPOINT_H
 
+#include "qemu/queue.h"
 #include "exec/breakpoint.h"
+#include "exec/memattrs.h"
+#include "exec/vaddr.h"
+
+typedef struct CPUWatchpoint {
+    vaddr vaddr;
+    vaddr len;
+    vaddr hitaddr;
+    MemTxAttrs hitattrs;
+    BreakpointFlags flags;
+    QTAILQ_ENTRY(CPUWatchpoint) entry;
+} CPUWatchpoint;
 
 int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len,
                           BreakpointFlags flags, CPUWatchpoint **watchpoint);
diff --git a/target/arm/internals.h b/target/arm/internals.h
index 067c3f2b8bb..72ef3a2bf9c 100644
--- a/target/arm/internals.h
+++ b/target/arm/internals.h
@@ -29,6 +29,7 @@
 #include "exec/vaddr.h"
 #include "exec/breakpoint.h"
 #include "exec/memop.h"
+#include "exec/watchpoint.h"
 #include "gdbstub/enums.h"
 #ifdef CONFIG_TCG
 #include "accel/tcg/tb-cpu-state.h"
diff --git a/gdbstub/system.c b/gdbstub/system.c
index 3098fd55740..1ce05989715 100644
--- a/gdbstub/system.c
+++ b/gdbstub/system.c
@@ -18,6 +18,7 @@
 #include "gdbstub/syscalls.h"
 #include "gdbstub/commands.h"
 #include "exec/hwaddr.h"
+#include "exec/watchpoint.h"
 #include "accel/accel-ops.h"
 #include "accel/accel-cpu-ops.h"
 #include "system/address-spaces.h"
diff --git a/target/arm/hyp_gdbstub.c b/target/arm/hyp_gdbstub.c
index dda6946ddaa..62dd91169dd 100644
--- a/target/arm/hyp_gdbstub.c
+++ b/target/arm/hyp_gdbstub.c
@@ -10,6 +10,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "exec/watchpoint.h"
 #include "cpu.h"
 #include "internals.h"
 #include "gdbstub/enums.h"
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index 1e09155e92c..372781ae715 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -70,6 +70,7 @@
 #include "migration/blocker.h"
 #include "exec/memattrs.h"
 #include "exec/target_page.h"
+#include "exec/watchpoint.h"
 #include "trace.h"
 
 #include CONFIG_DEVICES
diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
index 6bdfbbd68d6..85b15602396 100644
--- a/target/ppc/kvm.c
+++ b/target/ppc/kvm.c
@@ -41,6 +41,7 @@
 #include "trace.h"
 #include "gdbstub/enums.h"
 #include "exec/memattrs.h"
+#include "exec/watchpoint.h"
 #include "system/ramblock.h"
 #include "system/hostmem.h"
 #include "qemu/cutils.h"
diff --git a/target/s390x/kvm/kvm.c b/target/s390x/kvm/kvm.c
index 195e39df032..bb329883c97 100644
--- a/target/s390x/kvm/kvm.c
+++ b/target/s390x/kvm/kvm.c
@@ -49,6 +49,7 @@
 #include "hw/s390x/ipl.h"
 #include "hw/s390x/ebcdic.h"
 #include "exec/memattrs.h"
+#include "exec/watchpoint.h"
 #include "hw/s390x/s390-virtio-ccw.h"
 #include "hw/s390x/s390-hypercall.h"
 #include "target/s390x/kvm/pv.h"
diff --git a/target/xtensa/helper.c b/target/xtensa/helper.c
index 5a0e8655146..ac722f6782a 100644
--- a/target/xtensa/helper.c
+++ b/target/xtensa/helper.c
@@ -30,6 +30,7 @@
 #include "cpu.h"
 #include "exec/cputlb.h"
 #include "exec/target_page.h"
+#include "exec/watchpoint.h"
 #include "gdbstub/helpers.h"
 #include "exec/helper-proto.h"
 #include "accel/tcg/cpu-loop.h"
-- 
2.53.0


Reply via email to