Skip to main content

Crate soldb_repl

Crate soldb_repl 

Source
Expand description

The interactive debugger’s command parser and state machine.

DebuggerCommand::parse turns a typed line into a command, and DebuggerState::apply_command applies the ones that move the debugger or change its breakpoints, returning a StepOutcome describing what happened.

This crate performs no I/O: it neither reads stdin nor prints. The frontend owns the terminal and renders outcomes, which is what makes stepping, breakpoints, and command parsing testable without a terminal or a node. Commands that only display something (vars, backtrace, list, info) return None from apply_command; the frontend reads the data it needs through the state’s accessors and formats it.

The trace is a complete recording, so every movement is a search over it, forward or backward, and a breakpoint is a predicate on a step: a program counter, the start of a source line, the entry of a function, a storage write, a revert, a call, an opcode. Source-level movement comes from soldb_debugger::StepMap, which every frontend shares, so next means the same thing in the terminal and in an editor.

Structs§

Breakpoint
A breakpoint as set, with a stable number the user can delete it by.
DebuggerState
SourceBreakpointTarget

Enums§

BreakpointKind
BreakpointTarget
What the user asked to break on, before it is resolved against the trace.
DebuggerCommand
DebuggerInfoCommand
DisplayMode
StepOutcome