From c0df53752c86e5f51e12e7b99501b6f4d2e52c01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 26 Jun 2026 15:16:02 +0200 Subject: [PATCH] cpu: Only check SSTEP_ENABLE flag in cpu_single_stepping() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only the SSTEP_ENABLE bitmask means single-step is enabled. Fixes: 60897d369f1 ("Debugger single step without interrupts") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza Reviewed-by: Richard Henderson Message-ID: <20260705215729.62196-33-philmd@oss.qualcomm.com> --- include/hw/core/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index db4865bd63..b54035fb13 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -1146,7 +1146,7 @@ void cpu_single_step(CPUState *cpu, unsigned flags); */ static inline bool cpu_single_stepping(const CPUState *cpu) { - return cpu->singlestep_flags; + return cpu->singlestep_flags & SSTEP_ENABLE; } int cpu_breakpoint_insert(CPUState *cpu, vaddr pc, int flags,