Skip to main content

BreakpointHandler

Type Alias BreakpointHandler 

Source
pub type BreakpointHandler = fn(BreakpointStop) -> Resume;
Expand description

A host’s breakpoint handler: given a stop, answers what to do next.

A plain fn for InputReader’s reason: it is stored across the ABI boundary and called from generated code’s stack, so it carries no captured state and no lifetime. A host that needs state puts it in its own thread-local, which is what praxis-cli does.

The stop arrives by value because the debugger the CLI builds from it owns its snapshot, and it must be dropped before the handler returns — see BreakpointStop.