Files
ppsspp/Core
Henrik RydgårdandClaude Opus 5 4e24c195ac Fix the debugger log stream going out of step after 1024 messages
DebuggerLogListener keeps a ring of the last BUFFER_SIZE messages. read_ and
count_ count messages ever read/written, while messages_ is indexed modulo
BUFFER_SIZE - but the non-overflow path used read_ directly as the index. Once
a session had logged BUFFER_SIZE messages that index was past the end of the
array, so the first copy loop (bounded by BUFFER_SIZE) ran zero times and the
second one handed back messages_[0..readCount-1] instead: real log messages,
just the wrong ones, and every later poll stayed the same distance out of step.

It looks like the tail of the log going missing rather than being wrong, which
is a bad way to find out. A log-only breakpoint in a hot loop reaches 1024
messages in seconds, and then "the last thing logged before the breakpoint hit"
- exactly what such a breakpoint is for - names an event thousands of messages
old. Confirmed against a case with an independently known answer: a log-only
breakpoint recording a register in a loop that runs ~20k times now ends with
the value that register actually held at the final hit, where before it ended
several hundred iterations short of it.

The overflow path was already correct - it starts from nextMessage_, which is
an index - so only the one line changes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-07 18:42:39 -06:00
..
2026-06-02 11:15:08 +02:00
2026-08-31 01:19:06 +02:00
2026-08-31 01:19:06 +02:00
2025-03-27 14:26:48 +01:00
2026-07-29 16:27:33 +02:00
2026-08-11 15:43:48 +02:00
2026-07-27 18:37:28 +02:00
2026-08-31 01:19:06 +02:00
2026-09-04 13:06:24 -06:00
2026-08-15 18:31:20 +02:00