diff mbox series

[38/66] bsd-user: Remove dead watchpoint code from cpu_copy

Message ID 20260515-misc-2026q2-v1-38-5438ca41b27a@bsdimp.com
State New
Headers show
Series bsd-user: Upstream most of the remaining system calls | expand

Commit Message

Warner Losh May 15, 2026, 9:19 p.m. UTC
Watchpoints cannot work in user-mode emulation because it requires
the softmmu slow path to detect accesses to watchpointed memory.
Port the equivalent linux-user cleanup from 48c8c5e886.

Signed-off-by: Warner Losh <imp@bsdimp.com>
---
 bsd-user/main.c | 5 -----
 1 file changed, 5 deletions(-)
diff mbox series

Patch

diff --git a/bsd-user/main.c b/bsd-user/main.c
index 415852d88a..a79ee52cc1 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -233,7 +233,6 @@  CPUArchState *cpu_copy(CPUArchState *env)
     CPUState *new_cpu = cpu_create(cpu_type);
     CPUArchState *new_env = cpu_env(new_cpu);
     CPUBreakpoint *bp;
-    CPUWatchpoint *wp;
 
     /* Reset non arch specific state */
     cpu_reset(new_cpu);
@@ -247,13 +246,9 @@  CPUArchState *cpu_copy(CPUArchState *env)
      * BP_CPU break/watchpoints are handled correctly on clone.
      */
     QTAILQ_INIT(&cpu->breakpoints);
-    QTAILQ_INIT(&cpu->watchpoints);
     QTAILQ_FOREACH(bp, &cpu->breakpoints, entry) {
         cpu_breakpoint_insert(new_cpu, bp->pc, bp->flags, NULL);
     }
-    QTAILQ_FOREACH(wp, &cpu->watchpoints, entry) {
-        cpu_watchpoint_insert(new_cpu, wp->vaddr, wp->len, wp->flags, NULL);
-    }
 
     return new_env;
 }