pub struct Session { /* private fields */ }Expand description
A debugging session over one trace.
Implementations§
Source§impl Session
impl Session
pub fn new(state: DebuggerState) -> Self
Sourcepub fn with_chain(self, chain: Option<Box<dyn ChainStorage>>) -> Self
pub fn with_chain(self, chain: Option<Box<dyn ChainStorage>>) -> Self
Reads storage slots the trace never touched from chain.
pub fn state(&self) -> &DebuggerState
pub fn state_mut(&mut self) -> &mut DebuggerState
Sourcepub fn storage_words(&self) -> Option<StorageWords<'_>>
pub fn storage_words(&self) -> Option<StorageWords<'_>>
The storage words known at the current step, read from the chain for slots the trace never touched when a chain is attached.
Sourcepub fn loaded(&self) -> Output
pub fn loaded(&self) -> Output
What was loaded: the trace’s size and the contracts with sources.
Sourcepub fn initial_stop(&self) -> Vec<Output>
pub fn initial_stop(&self) -> Vec<Output>
Where the session is now, as the first stop.
Sourcepub fn execute(&mut self, command: DebuggerCommand) -> Vec<Output>
pub fn execute(&mut self, command: DebuggerCommand) -> Vec<Output>
Runs one command and answers it.
Sourcepub fn stop(&self, reason: StopReason) -> Option<Stop>
pub fn stop(&self, reason: StopReason) -> Option<Stop>
The current step as a stop, or None without a trace.
pub fn breakpoints(&self) -> Output
Sourcepub fn backtrace(&mut self) -> Output
pub fn backtrace(&mut self) -> Output
The call structure at the current step, innermost frame first.
Sourcepub fn listing(&self, radius: u64) -> Output
pub fn listing(&self, radius: u64) -> Output
radius lines of source on each side of the current step’s line.
Sourcepub fn memory(&self, offset: Option<u64>, length: Option<u64>) -> Output
pub fn memory(&self, offset: Option<u64>, length: Option<u64>) -> Output
Memory at the current step in 32-byte words, the whole of it or one range.
Sourcepub fn storage(&self) -> Output
pub fn storage(&self) -> Output
Every slot whose value is known at the current step: what the transaction has read or written so far in this frame’s storage.
Sourcepub fn transient_storage(&self) -> Output
pub fn transient_storage(&self) -> Output
Every transient storage slot whose value is known at the current step.
Sourcepub fn return_data(&self) -> Output
pub fn return_data(&self) -> Output
The return data buffer at the current step.
pub fn calldata(&self) -> Output
Sourcepub fn stack(&self, limit: Option<usize>) -> Output
pub fn stack(&self, limit: Option<usize>) -> Output
The stack at the current step, all of it or the top limit words.