Expand description
Event handlers backing the miden::core::debug print-debugging module.
Each miden::core::debug::print_* procedure emits a well-known event. This module registers a
single DebugPrinter handler for all of those events; when one fires, the handler reads the
requested piece of VM state (operand stack, memory, advice stack, or advice map) and prints it
using the VM’s tree-style debug formatting via miden_processor::write_stack /
miden_processor::write_interval. A range-based procedure may share an event with its
full-state variant when the full-state behavior can be represented as an unbounded range (e.g.
the advice stack); memory uses a dedicated full-state event because print_mem enumerates its
(capped) range while print_mem_all lists only initialized cells.
These are ordinary emit events: they carry no MAST/decorator cost and print whenever the
procedure is executed.
Structs§
- Debug
Printer - Handles all
miden::core::debug::print_*events by printing VM state to its writer.
Constants§
- PRINT_
ADV_ MAP_ EVENT_ NAME - Prints the full advice map.
- PRINT_
ADV_ MAP_ ITEM_ EVENT_ NAME - Looks up a WORD key in the advice map and prints the associated values.
- PRINT_
ADV_ STACK_ EVENT_ NAME - Prints the advice stack in the range
[start, end). - PRINT_
MEM_ ALL_ EVENT_ NAME - Prints the entire memory of the current context.
- PRINT_
MEM_ EVENT_ NAME - Prints memory in the range
[start, end)of the current context. - PRINT_
STACK_ EVENT_ NAME - Prints the entire operand stack.
Functions§
- advice_
debug_ handlers - Returns the opt-in
(EventName, handler)pairs for advice-backed debug events. - debug_
handlers - Returns the
(EventName, handler)pairs that back the fullmiden::core::debugmodule. - default_
debug_ handlers - Returns the default
(EventName, handler)pairs for print-style debugging. - noop_
debug_ handlers - Returns no-op handlers for every
miden::core::debugprint event.