aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-07-19 08:22:47 -1000
committerRichard Henderson <richard.henderson@linaro.org>2021-07-21 07:47:05 -1000
commit7b9810ea4269fea04c3b95951fb279dc72db4132 (patch)
tree8d09f944f9a51a09a4f39dac6064f8b2f7d7b913 /target
parentb00d86bc8bfe54fd9e4343cfa1f77fbbcbe32d95 (diff)
downloadqemu-7b9810ea4269fea04c3b95951fb279dc72db4132.zip
qemu-7b9810ea4269fea04c3b95951fb279dc72db4132.tar.gz
qemu-7b9810ea4269fea04c3b95951fb279dc72db4132.tar.bz2
target/i386: Implement debug_check_breakpoint
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>
Diffstat (limited to 'target')
-rw-r--r--target/i386/tcg/tcg-cpu.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c
index e96ec9b..238e3a9 100644
--- a/target/i386/tcg/tcg-cpu.c
+++ b/target/i386/tcg/tcg-cpu.c
@@ -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 */
};