cpu: Move BREAKPOINT definitions to 'exec/breakpoint.h'
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Reviewed-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20260705215729.62196-20-philmd@oss.qualcomm.com>
Philippe Mathieu-Daudé committed
Jun 29, 2026 at 08:55 UTC
fe90b5f15b4523e8def87a1a703dba86601d1f67
2 files changed
+14
-14
include/exec/breakpoint.h
+14
@@ -12,6 +12,20 @@
12
#include "exec/vaddr.h"
13
#include "exec/memattrs.h"
14
15
+/* Breakpoint/watchpoint flags */
16
+#define BP_MEM_READ 0x01
17
+#define BP_MEM_WRITE 0x02
18
+#define BP_MEM_ACCESS (BP_MEM_READ | BP_MEM_WRITE)
19
+#define BP_STOP_BEFORE_ACCESS 0x04
20
+/* 0x08 currently unused */
21
+#define BP_GDB 0x10
22
+#define BP_CPU 0x20
23
+#define BP_ANY (BP_GDB | BP_CPU)
24
+#define BP_HIT_SHIFT 6
25
+#define BP_WATCHPOINT_HIT_READ (BP_MEM_READ << BP_HIT_SHIFT)
26
+#define BP_WATCHPOINT_HIT_WRITE (BP_MEM_WRITE << BP_HIT_SHIFT)
27
+#define BP_WATCHPOINT_HIT (BP_MEM_ACCESS << BP_HIT_SHIFT)
28
+
29
typedef struct CPUBreakpoint {
30
vaddr pc;
31
int flags; /* BP_* */
include/hw/core/cpu.h
-14
@@ -1138,20 +1138,6 @@ void qemu_init_vcpu(CPUState *cpu);
1138
*/
1139
void cpu_single_step(CPUState *cpu, int enabled);
1140
1141
-/* Breakpoint/watchpoint flags */
1142
-#define BP_MEM_READ 0x01
1143
-#define BP_MEM_WRITE 0x02
1144
-#define BP_MEM_ACCESS (BP_MEM_READ | BP_MEM_WRITE)
1145
-#define BP_STOP_BEFORE_ACCESS 0x04
1146
-/* 0x08 currently unused */
1147
-#define BP_GDB 0x10
1148
-#define BP_CPU 0x20
1149
-#define BP_ANY (BP_GDB | BP_CPU)
1150
-#define BP_HIT_SHIFT 6
1151
-#define BP_WATCHPOINT_HIT_READ (BP_MEM_READ << BP_HIT_SHIFT)
1152
-#define BP_WATCHPOINT_HIT_WRITE (BP_MEM_WRITE << BP_HIT_SHIFT)
1153
-#define BP_WATCHPOINT_HIT (BP_MEM_ACCESS << BP_HIT_SHIFT)
1154
-
1141
int cpu_breakpoint_insert(CPUState *cpu, vaddr pc, int flags,
1142
CPUBreakpoint **breakpoint);
1143
int cpu_breakpoint_remove(CPUState *cpu, vaddr pc, int flags);