WebSocket debugger: runUntilTime that's already there, and across loads

A target time that had already passed, relativeUs 0 for one, failed
without a stop event, so a client waiting for cpu.stepping waited until
its own timeout. Now it doesn't run, and reports the stop right away.

A savestate loaded during the run kept the deadline's absolute time,
which belongs to the timeline the load replaced: a state from later in
the game stopped the run at once, one from earlier ran it for as long
as the gap. Now the deadline keeps the time it had left.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-29 00:21:49 +01:00
1 parent df72f3be81
commit 93b7dacc1e
5 files changed
+35 -9

No files matched your search

+16
View File
@@ -712,6 +712,22 @@ void Core_Break(BreakReason reason, u32 relatedAddress, const BreakpointHit *hit
System_Notify(SystemNotification::DEBUG_MODE_CHANGE);
}
void Core_ReportBreakWithoutRunning(BreakReason reason, u32 relatedAddress) {
if (coreState != CORE_STEPPING_CPU) {
return;
}
std::lock_guard<std::mutex> lock(g_stepMutex);
if (!g_cpuStepCommand.empty()) {
// A step is about to run, and its own stop will be reported.
return;
}
g_breakReason = reason;
g_breakHit = BreakpointHit{};
g_cpuStepCommand.reason = reason;
g_cpuStepCommand.relatedAddr = relatedAddress;
steppingCounter++;
}
// Free-threaded (or at least should be)
void Core_Resume() {
// If the current PC is on a breakpoint, the user doesn't want to do nothing.