Files
Matthew Stanley b23bd9a889 debug: add armed-range RAM read-trace (rtrace_*) to the debug server
Loads in recompiled code route through cpu->read_word/half/byte
(= psx_read_word/half/byte), so a read hook is a pure runtime change
(no emitter edit, no regen). Adds debug_server_trace_read_check() called
from the RAM branch of each reader in memory.c (guarded by
PSX_NO_DEBUG_TOOLS), plus an armed-range read ring + commands:
rtrace_arm {addr_lo,addr_hi} / rtrace_disarm_all / rtrace_reset /
rtrace_stats / rtrace_dump {addr_lo,addr_hi,count,newest}. Entries carry
addr,val,func,ra,frame,w. Disarmed cost is a single range_count==0 test.

Mirrors the existing wtrace pattern; used to hunt "what code READS a value"
(e.g. the canonical option-config global behind per-frame display mirrors).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 15:28:59 -07:00
..