pub struct DebugSession { /* private fields */ }Expand description
Debug session managing the state of debugging
Implementations§
Source§impl DebugSession
impl DebugSession
Sourcepub fn new(graph: ComputationGraph, config: DebuggerConfig) -> Self
pub fn new(graph: ComputationGraph, config: DebuggerConfig) -> Self
Create a new debug session for a computation graph
§Arguments
graph- The computation graph to debugconfig- Configuration for the debug session
Sourcepub fn from_ir(ir_module: IrModule, config: DebuggerConfig) -> Self
pub fn from_ir(ir_module: IrModule, config: DebuggerConfig) -> Self
Create a new debug session for an IR module
§Arguments
ir_module- The IR module to debugconfig- Configuration for the debug session
Sourcepub fn step(&mut self) -> JitResult<StepResult>
pub fn step(&mut self) -> JitResult<StepResult>
Sourcepub fn step_over(&mut self) -> JitResult<StepResult>
pub fn step_over(&mut self) -> JitResult<StepResult>
Sourcepub fn step_into(&mut self) -> JitResult<StepResult>
pub fn step_into(&mut self) -> JitResult<StepResult>
Sourcepub fn step_out(&mut self) -> JitResult<StepResult>
pub fn step_out(&mut self) -> JitResult<StepResult>
Execute a step out (continue until returning from current function)
§Returns
The result of the step-out execution
Sourcepub fn continue_execution(&mut self) -> JitResult<ContinueResult>
pub fn continue_execution(&mut self) -> JitResult<ContinueResult>
Sourcepub fn is_execution_complete(&self) -> bool
pub fn is_execution_complete(&self) -> bool
Check if execution is complete
Sourcepub fn inspect_target(
&self,
target: &InspectionTarget,
) -> JitResult<InspectionResult>
pub fn inspect_target( &self, target: &InspectionTarget, ) -> JitResult<InspectionResult>
Sourcepub fn evaluate_expression(
&self,
expression: &str,
) -> JitResult<EvaluationResult>
pub fn evaluate_expression( &self, expression: &str, ) -> JitResult<EvaluationResult>
Sourcepub fn get_current_state(&self) -> DebugState
pub fn get_current_state(&self) -> DebugState
Get current debug state
Sourcepub fn get_execution_trace(&self) -> Vec<ExecutionStep>
pub fn get_execution_trace(&self) -> Vec<ExecutionStep>
Get execution trace
Sourcepub fn get_call_stack(&self) -> CallStack
pub fn get_call_stack(&self) -> CallStack
Get call stack
Sourcepub fn get_local_variables(&self) -> HashMap<String, DebugValue>
pub fn get_local_variables(&self) -> HashMap<String, DebugValue>
Get local variables
Sourcepub fn get_memory_view(&self, address: u64) -> JitResult<MemoryView>
pub fn get_memory_view(&self, address: u64) -> JitResult<MemoryView>
Get memory view
Sourcepub fn disassemble_at(
&self,
location: ExecutionLocation,
) -> JitResult<DisassemblyView>
pub fn disassemble_at( &self, location: ExecutionLocation, ) -> JitResult<DisassemblyView>
Disassemble at location
Sourcepub fn get_statistics(&self) -> DebugStatistics
pub fn get_statistics(&self) -> DebugStatistics
Get debug statistics
Sourcepub fn config(&self) -> &DebuggerConfig
pub fn config(&self) -> &DebuggerConfig
Get configuration
Sourcepub fn update_config(&mut self, config: DebuggerConfig)
pub fn update_config(&mut self, config: DebuggerConfig)
Update configuration
Sourcepub fn set_variable(&mut self, name: String, value: DebugValue)
pub fn set_variable(&mut self, name: String, value: DebugValue)
Set a variable value (for testing/debugging purposes)
Sourcepub fn get_variable(&self, name: &str) -> Option<&DebugValue>
pub fn get_variable(&self, name: &str) -> Option<&DebugValue>
Get variable value
Sourcepub fn get_execution_engine_statistics(
&self,
) -> &HashMap<String, OperationStatistics>
pub fn get_execution_engine_statistics( &self, ) -> &HashMap<String, OperationStatistics>
Get execution engine statistics
Sourcepub fn memory_state(&self) -> &MemoryState
pub fn memory_state(&self) -> &MemoryState
Get memory state
Sourcepub fn memory_state_mut(&mut self) -> &mut MemoryState
pub fn memory_state_mut(&mut self) -> &mut MemoryState
Get mutable memory state
Trait Implementations§
Source§impl ExpressionEvaluator for DebugSession
impl ExpressionEvaluator for DebugSession
Source§fn evaluate_expression(&self, expression: &str) -> JitResult<EvaluationResult>
fn evaluate_expression(&self, expression: &str) -> JitResult<EvaluationResult>
Evaluate an expression and return the result
Auto Trait Implementations§
impl Freeze for DebugSession
impl RefUnwindSafe for DebugSession
impl Send for DebugSession
impl Sync for DebugSession
impl Unpin for DebugSession
impl UnsafeUnpin for DebugSession
impl UnwindSafe for DebugSession
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more