[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH for-6.1 v5 10/15] target/i386: Implement debug_check_breakpoint
From: |
Richard Henderson |
Subject: |
[PATCH for-6.1 v5 10/15] target/i386: Implement debug_check_breakpoint |
Date: |
Mon, 19 Jul 2021 15:17:55 -1000 |
Return false for RF set, as we do in i386_tr_breakpoint_check.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/i386/tcg/tcg-cpu.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c
index e96ec9bbcc..238e3a9395 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 */
};
--
2.25.1
- Re: [PATCH for-6.1 v5 03/15] target/alpha: Drop goto_tb path in gen_call_pal, (continued)
- [PATCH for-6.1 v5 04/15] accel/tcg: Add CF_NO_GOTO_TB and CF_NO_GOTO_PTR, Richard Henderson, 2021/07/19
- [PATCH for-6.1 v5 05/15] accel/tcg: Drop CF_NO_GOTO_PTR from -d nochain, Richard Henderson, 2021/07/19
- [PATCH for-6.1 v5 06/15] accel/tcg: Handle -singlestep in curr_cflags, Richard Henderson, 2021/07/19
- [PATCH for-6.1 v5 07/15] accel/tcg: Use CF_NO_GOTO_{TB, PTR} in cpu_exec_step_atomic, Richard Henderson, 2021/07/19
- [PATCH for-6.1 v5 11/15] accel/tcg: Merge tb_find into its only caller, Richard Henderson, 2021/07/19
- [PATCH for-6.1 v5 12/15] accel/tcg: Move breakpoint recognition outside translation, Richard Henderson, 2021/07/19
- [PATCH for-6.1 v5 09/15] target/arm: Implement debug_check_breakpoint, Richard Henderson, 2021/07/19
- [PATCH for-6.1 v5 10/15] target/i386: Implement debug_check_breakpoint,
Richard Henderson <=
- [PATCH for-6.1 v5 15/15] accel/tcg: Record singlestep_enabled in tb->cflags, Richard Henderson, 2021/07/19
- [PATCH for-6.1 v5 13/15] accel/tcg: Remove TranslatorOps.breakpoint_check, Richard Henderson, 2021/07/19
- [PATCH for-6.1 v5 08/15] hw/core: Introduce TCGCPUOps.debug_check_breakpoint, Richard Henderson, 2021/07/19
- [PATCH for-6.1 v5 14/15] accel/tcg: Hoist tb_cflags to a local in translator_loop, Richard Henderson, 2021/07/19
- Re: [PATCH for-6.1 v5 00/15] tcg: breakpoint reorg, Richard Henderson, 2021/07/19