mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-04 19:55:27 +02:00
The tick basis was actually sound - CoreTiming::GetTicks() is continuous across Advance(), so "ticks unchanged" really does mean "no instruction retired since", which is exactly the window the suppression needs. The plumbing around it was the problem: - ExecRegBreakpoint() applied the skip only to the pause, so stepping off a log+pause register breakpoint printed it again and counted a second hit. The check now sits at the top of ExecBreakPoint(), ExecMemCheck(), ExecOpMemCheck() and ExecRegBreakpoint() instead of being repeated at seven call sites across the interpreter and four JIT frontends, where one of them had it wrong and another checked a different address than the rest. - Address 0 doubled as "nothing to skip" (ClearSkipFirst() existed but was dead code; the JITs cleared by calling SetSkipFirst(0)), so a breakpoint at 0 would have been permanently suppressed. There's an explicit valid flag now, and ClearSkipFirst() is what clears it. - The marker was set from five places and never cleared when execution stopped, so one could outlive the resume that armed it. Core_Break() clears it now, and the two WebSocket subscribers that set it immediately before asking for a step - which sets it again itself - no longer do. - SetSkipFirst() now only arms when some breakpoint machinery actually exists, so a stale marker can't sit around waiting to swallow a breakpoint added later. CheckSkipFirst() returning an address (compared against pc by each caller) is replaced by ShouldSkipBreakpoint(addr), which compares against both addr and currentMIPS->pc - under a JIT those differ, and only some callers knew that. Covered by the Breakpoints unit test, including that a suppressed breakpoint neither logs nor counts a hit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GZq8ZtJmFY7bkX5FVkr3P9