pub struct Debugger<H: SyscallHandler> {Show 13 fields
pub vm: SbpfVm<H>,
pub breakpoints: HashSet<u64>,
pub line_breakpoints: HashSet<usize>,
pub dwarf_line_map: Option<LineMap>,
pub rodata: Option<Vec<RODataSymbol>>,
pub last_breakpoint: Option<u64>,
pub debug_mode: DebugMode,
pub stopped: bool,
pub exit_code: u64,
pub at_breakpoint: bool,
pub last_breakpoint_pc: Option<u64>,
pub initial_compute_budget: u64,
pub instruction_offsets: Vec<u64>,
}Fields§
§vm: SbpfVm<H>§breakpoints: HashSet<u64>§line_breakpoints: HashSet<usize>§dwarf_line_map: Option<LineMap>§rodata: Option<Vec<RODataSymbol>>§last_breakpoint: Option<u64>§debug_mode: DebugMode§stopped: bool§exit_code: u64§at_breakpoint: bool§last_breakpoint_pc: Option<u64>§initial_compute_budget: u64§instruction_offsets: Vec<u64>Implementations§
Source§impl<H: SyscallHandler> Debugger<H>
impl<H: SyscallHandler> Debugger<H>
pub fn new(vm: SbpfVm<H>) -> Self
pub fn set_dwarf_line_map(&mut self, dwarf_map: LineMap)
pub fn set_rodata(&mut self, rodata: Vec<RODataSymbol>)
pub fn set_breakpoint(&mut self, pc: u64)
pub fn set_breakpoint_at_line(&mut self, line: usize) -> Result<(), String>
pub fn remove_breakpoint_at_line(&mut self, line: usize) -> Result<(), String>
pub fn get_current_line(&self) -> Option<usize>
pub fn get_line_for_pc(&self, pc: u64) -> Option<usize>
pub fn get_pcs_for_line(&self, line: usize) -> Vec<u64>
pub fn get_breakpoints_info(&self) -> String
pub fn set_debug_mode(&mut self, debug_mode: DebugMode)
pub fn run(&mut self) -> DebuggerResult<DebugEvent>
pub fn get_pc(&self) -> u64
pub fn get_registers(&self) -> &[u64]
pub fn get_register(&self, idx: usize) -> Option<u64>
pub fn set_register_value( &mut self, idx: usize, value: u64, ) -> Result<(), String>
pub fn get_rodata(&self) -> Option<&Vec<RODataSymbol>>
pub fn get_compute_units(&self) -> u64
pub fn get_instruction(&self) -> Option<&Instruction>
pub fn get_instruction_asm(&self) -> Option<String>
pub fn get_source_location(&self, pc: u64) -> Option<(&str, usize, usize)>
pub fn clear_breakpoints(&mut self)
pub fn get_memory(&self, address: u64, size: usize) -> Option<Vec<u8>>
pub fn get_stack_frames(&self) -> Vec<StackFrame<'_>>
Trait Implementations§
Source§impl<H: SyscallHandler> DebuggerInterface for Debugger<H>
impl<H: SyscallHandler> DebuggerInterface for Debugger<H>
fn next(&mut self) -> Value
fn continue(&mut self) -> Value
fn set_breakpoint(&mut self, file: String, line: usize) -> Value
fn remove_breakpoint(&mut self, file: String, line: usize) -> Value
fn get_stack_frames(&self) -> Value
fn get_registers(&self) -> Value
fn get_memory(&self, address: u64, size: usize) -> Value
fn set_register(&mut self, index: usize, value: u64) -> Value
fn get_rodata(&self) -> Value
fn clear_breakpoints(&mut self, _file: String) -> Value
fn quit(&mut self) -> Value
fn get_compute_units(&self) -> Value
fn run_to_json(&mut self) -> Value
Auto Trait Implementations§
impl<H> Freeze for Debugger<H>where
H: Freeze,
impl<H> !RefUnwindSafe for Debugger<H>
impl<H> !Send for Debugger<H>
impl<H> !Sync for Debugger<H>
impl<H> Unpin for Debugger<H>where
H: Unpin,
impl<H> UnsafeUnpin for Debugger<H>where
H: UnsafeUnpin,
impl<H> !UnwindSafe for Debugger<H>
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