]> git.proxmox.com Git - mirror_qemu.git/commitdiff
target/i386: Implement debug_check_breakpoint
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 19 Jul 2021 18:22:47 +0000 (08:22 -1000)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 21 Jul 2021 17:47:05 +0000 (07:47 -1000)
Return false for RF set, as we do in i386_tr_breakpoint_check.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/i386/tcg/tcg-cpu.c

index e96ec9bbccbf3628d89cc83d52a6857bf7de77ec..238e3a9395b2f2571115bb2235165ebdfa7c7ecb 100644 (file)
@@ -54,6 +54,17 @@ static void x86_cpu_synchronize_from_tb(CPUState *cs,
     cpu->env.eip = tb->pc - tb->cs_base;
 }
 
+#ifndef CONFIG_USER_ONLY
+static bool x86_debug_check_breakpoint(CPUState *cs)
+{
+    X86CPU *cpu = X86_CPU(cs);
+    CPUX86State *env = &cpu->env;
+
+    /* RF disables all architectural breakpoints. */
+    return !(env->eflags & RF_MASK);
+}
+#endif
+
 #include "hw/core/tcg-cpu-ops.h"
 
 static const struct TCGCPUOps x86_tcg_ops = {
@@ -66,6 +77,7 @@ static const struct TCGCPUOps x86_tcg_ops = {
     .tlb_fill = x86_cpu_tlb_fill,
 #ifndef CONFIG_USER_ONLY
     .debug_excp_handler = breakpoint_handler,
+    .debug_check_breakpoint = x86_debug_check_breakpoint,
 #endif /* !CONFIG_USER_ONLY */
 };