ppsspp_wait_breakpoint
Blocks until a breakpoint hit occurs, returning hit details. Use after arming a breakpoint; on timeout returns hit=false instead of an error.
Instructions
PURPOSE: Block until a breakpoint hit (any kind) — replaces polling gpu_stats errors as a hit probe.
USAGE: session_id; timeout_s default 30. Arm a breakpoint first via ppsspp_breakpoint (set or mem_set). Use when you only need to know a hit happened; call ppsspp_trace_memory_access instead to capture the hit scene (registers/backtrace) in one step.
BEHAVIOR: READ-ONLY. Subscribes to the cpu.stepping broadcast and holds NO session lock — concurrent reads/observes keep working, but do NOT submit step/pause/resume during the wait. An already-paused CPU returns hit=true + already_paused=true with a high-trust pc (a manual pause is indistinguishable from a hit).
RETURNS: {hit, already_paused, timeout_s, pc, reason, related_address, ticks} — timeout returns hit=false (pollable, not an error); reason/related_address may be null on some builds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeout_s | No | Wait budget in seconds (default 30, clamped to [0.5, 300]). On timeout the tool returns hit=false — NOT an error — so callers can poll. | |
| session_id | Yes | Active session ID. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pc | Yes | Program counter at the hit, hex string. | |
| hit | Yes | True when the CPU entered stepping (breakpoint hit, or it was already paused when the tool was called). | |
| ticks | Yes | CoreTiming tick count at the hit. | |
| reason | Yes | cpu.stepping broadcast reason (e.g. 'breakpoint' / 'memory.breakpoint'). | |
| timeout_s | Yes | The wait budget that was applied. | |
| already_paused | Yes | True when the CPU was found in stepping state at arm time — the hit happened before this tool call. | |
| related_address | Yes | Broadcast relatedAddress, hex string (memory breakpoints: the accessed address). |