Skip to main content

DebugSession

Struct DebugSession 

Source
pub struct DebugSession { /* private fields */ }
Expand description

Debug session managing the state of debugging

Implementations§

Source§

impl DebugSession

Source

pub fn new(graph: ComputationGraph, config: DebuggerConfig) -> Self

Create a new debug session for a computation graph

§Arguments
  • graph - The computation graph to debug
  • config - Configuration for the debug session
Source

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 debug
  • config - Configuration for the debug session
Source

pub fn step(&mut self) -> JitResult<StepResult>

Execute a single step

§Returns

The result of the step execution

Source

pub fn step_over(&mut self) -> JitResult<StepResult>

Execute a step over (don’t step into function calls)

§Returns

The result of the step-over execution

Source

pub fn step_into(&mut self) -> JitResult<StepResult>

Execute a step into (step into function calls)

§Returns

The result of the step-into execution

Source

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

Source

pub fn continue_execution(&mut self) -> JitResult<ContinueResult>

Continue execution until breakpoint or completion

§Returns

The result of continue execution

Source

pub fn is_execution_complete(&self) -> bool

Check if execution is complete

Source

pub fn inspect_target( &self, target: &InspectionTarget, ) -> JitResult<InspectionResult>

Inspect a target (variable, memory location, etc.)

§Arguments
  • target - The target to inspect
§Returns

The inspection result

Source

pub fn evaluate_expression( &self, expression: &str, ) -> JitResult<EvaluationResult>

Evaluate an expression in the current context

§Arguments
  • expression - The expression to evaluate
§Returns

The evaluation result

Source

pub fn get_current_state(&self) -> DebugState

Get current debug state

Source

pub fn get_execution_trace(&self) -> Vec<ExecutionStep>

Get execution trace

Source

pub fn get_call_stack(&self) -> CallStack

Get call stack

Source

pub fn get_local_variables(&self) -> HashMap<String, DebugValue>

Get local variables

Source

pub fn get_memory_view(&self, address: u64) -> JitResult<MemoryView>

Get memory view

Source

pub fn disassemble_at( &self, location: ExecutionLocation, ) -> JitResult<DisassemblyView>

Disassemble at location

Source

pub fn get_statistics(&self) -> DebugStatistics

Get debug statistics

Source

pub fn reset(&mut self)

Reset the debug session

Source

pub fn config(&self) -> &DebuggerConfig

Get configuration

Source

pub fn update_config(&mut self, config: DebuggerConfig)

Update configuration

Source

pub fn set_variable(&mut self, name: String, value: DebugValue)

Set a variable value (for testing/debugging purposes)

Source

pub fn get_variable(&self, name: &str) -> Option<&DebugValue>

Get variable value

Source

pub fn get_execution_engine_statistics( &self, ) -> &HashMap<String, OperationStatistics>

Get execution engine statistics

Source

pub fn memory_state(&self) -> &MemoryState

Get memory state

Source

pub fn memory_state_mut(&mut self) -> &mut MemoryState

Get mutable memory state

Trait Implementations§

Source§

impl ExpressionEvaluator for DebugSession

Source§

fn evaluate_expression(&self, expression: &str) -> JitResult<EvaluationResult>

Evaluate an expression and return the result

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V