pub struct DebugSession { /* private fields */ }Expand description
A debug session: owns a Debugger and answers DAP-shaped queries against it.
Implementations§
Source§impl DebugSession
impl DebugSession
Sourcepub fn launch(src: &str) -> Result<DebugSession, String>
pub fn launch(src: &str) -> Result<DebugSession, String>
launch — compile the program and stop before the first op.
Sourcepub fn stack_trace(&self) -> Vec<DapFrame>
pub fn stack_trace(&self) -> Vec<DapFrame>
stackTrace — the call frames, innermost-first (DAP order).
Sourcepub fn variables(&self, frame_id: i64) -> Vec<DapVariable>
pub fn variables(&self, frame_id: i64) -> Vec<DapVariable>
variables for a frame (addressed by its stackTrace id) — every register
in that frame, named when the compiler’s debug-info pass knew the source
name (else R{index}).
Sourcepub fn reverse_continue(&mut self)
pub fn reverse_continue(&mut self)
reverseContinue — run backwards to the previous breakpoint or the start.
Sourcepub fn set_breakpoint(&mut self, pc: usize)
pub fn set_breakpoint(&mut self, pc: usize)
setBreakpoints — arm one op-address breakpoint.
Sourcepub fn clear_breakpoint(&mut self, pc: usize)
pub fn clear_breakpoint(&mut self, pc: usize)
Clear one op-address breakpoint.
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Whether the program is still running (not finished, not errored).
Sourcepub fn evaluate(&self, expr: &str) -> Result<String, String>
pub fn evaluate(&self, expr: &str) -> Result<String, String>
evaluate — evaluate a LOGOS expression against the current (innermost)
frame’s named variables, through the Wave-10 frame evaluator (the
tree-walker oracle). Scalar bindings round-trip through LOGOS source;
complex values fail exactly as the tree-walker would.
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.