From 434f1b4e13475fcbf82cccc7666f851e2025c709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 18 Aug 2026 10:04:24 +0200 Subject: [PATCH] Give the cpu.runUntilTime deadline its own BreakReason It reported BreakReason::DebugBreak, the same reason a user hitting pause produces, so a client that asked to run until a point in emulated time couldn't tell its deadline landing from someone stopping the core by hand - the one piece of information the cpu.stepping event exists to convey. Reports "cpu.runUntilTime" now, matching the request that armed it. No client depended on the old string: nothing outside Core.cpp names "cpu.debugbreak", and wsdbg's resume handling keys off the event, not the reason. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01GZq8ZtJmFY7bkX5FVkr3P9 --- Core/Core.cpp | 1 + Core/Core.h | 1 + Core/CoreTiming.cpp | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Core/Core.cpp b/Core/Core.cpp index c8de069336..295288ba0a 100644 --- a/Core/Core.cpp +++ b/Core/Core.cpp @@ -262,6 +262,7 @@ const char *BreakReasonToString(BreakReason reason) { case BreakReason::FrameAdvance: return "ui.frameAdvance"; case BreakReason::UIPause: return "ui.pause"; case BreakReason::HLEDebugBreak: return "hle.step"; + case BreakReason::RunUntilTime: return "cpu.runUntilTime"; default: return "Unknown"; } } diff --git a/Core/Core.h b/Core/Core.h index 014aa14447..ffba3caf63 100644 --- a/Core/Core.h +++ b/Core/Core.h @@ -73,6 +73,7 @@ enum class BreakReason { FrameAdvance, UIPause, HLEDebugBreak, + RunUntilTime, }; const char *BreakReasonToString(BreakReason reason); diff --git a/Core/CoreTiming.cpp b/Core/CoreTiming.cpp index 5ff1812a78..d290a885ba 100644 --- a/Core/CoreTiming.cpp +++ b/Core/CoreTiming.cpp @@ -428,7 +428,7 @@ void Advance(MIPSState *mips) { if (breakDeadlineTicks && globalTimer >= breakDeadlineTicks) { breakDeadlineTicks = 0; breakDeadlineUs = 0; - Core_Break(BreakReason::DebugBreak, mips->pc); + Core_Break(BreakReason::RunUntilTime, mips->pc); } ProcessEvents();