pub struct Debugger<K: Ord + 'static, I> { /* private fields */ }Expand description
A component that manages breakpoints.
This component can handle both explicit breakpoints (those appearing in
source) and “gutter” breakpoints, or those that are inserted (similar to
gdb’s INT3 insertion on b).
Implementations§
Source§impl<K: Ord + 'static, I> Debugger<K, I>
impl<K: Ord + 'static, I> Debugger<K, I>
Sourcepub fn forget_breakpoints(&mut self)
pub fn forget_breakpoints(&mut self)
Discard all saved breakpoint instructions and paused-breakpoint state.
Use this when discarding the patched program, before using this debugger
with a different image. This does not restore instructions in the old
program. To remove breakpoints while keeping that program usable, call
Self::clear_all instead. Invocation-only resets retain breakpoints.
Source§impl<K: Ord + Clone + 'static, I: Clone> Debugger<K, I>
impl<K: Ord + Clone + 'static, I: Clone> Debugger<K, I>
Sourcepub fn set_breakpoint<P>(
&mut self,
program: &mut P,
key: K,
) -> IsBreakpointToggledwhere
P: BreakpointPatchableProgram<K, Instruction = I>,
pub fn set_breakpoint<P>(
&mut self,
program: &mut P,
key: K,
) -> IsBreakpointToggledwhere
P: BreakpointPatchableProgram<K, Instruction = I>,
Installs a gutter breakpoint and retains the displaced instruction.
Sourcepub fn clear_breakpoint<P>(
&mut self,
program: &mut P,
key: K,
) -> IsBreakpointToggledwhere
P: BreakpointPatchableProgram<K, Instruction = I>,
pub fn clear_breakpoint<P>(
&mut self,
program: &mut P,
key: K,
) -> IsBreakpointToggledwhere
P: BreakpointPatchableProgram<K, Instruction = I>,
Restores a gutter breakpoint’s displaced instruction.
pub fn toggle_breakpoint<P>(
&mut self,
program: &mut P,
key: K,
) -> IsBreakpointToggledwhere
P: BreakpointPatchableProgram<K, Instruction = I>,
pub fn clear_all<P>(&mut self, program: &mut P)where
P: BreakpointPatchableProgram<K, Instruction = I>,
pub fn breakpoints(&self) -> impl ExactSizeIterator<Item = &K> + '_
pub fn displaced(&self, key: &K) -> Option<&I>
pub fn contains(&self, key: &K) -> bool
Trait Implementations§
Source§impl<K: Ord + 'static, I> Capabilities for Debugger<K, I>
impl<K: Ord + 'static, I> Capabilities for Debugger<K, I>
Source§const DESCRIPTION: &'static Description
const DESCRIPTION: &'static Description
Raw generated data. Internal reporting uses the validated
capabilities.impl<K: Ord + 'static, I> Component for Debugger<K, I>
Source§impl<K: Ord + 'static, I> Execute<Breakpoint> for Debugger<K, I>
impl<K: Ord + 'static, I> Execute<Breakpoint> for Debugger<K, I>
Source§type Message = BreakpointMessage<K>
type Message = BreakpointMessage<K>
Input supplied by the runtime, rather than encoded in the instruction.
Source§type Error = Infallible
type Error = Infallible
The component’s execution error, usually
eyre::Report.Auto Trait Implementations§
impl<K, I> Freeze for Debugger<K, I>where
K: Freeze,
impl<K, I> RefUnwindSafe for Debugger<K, I>where
K: RefUnwindSafe,
I: RefUnwindSafe,
impl<K, I> Send for Debugger<K, I>
impl<K, I> Sync for Debugger<K, I>
impl<K, I> Unpin for Debugger<K, I>where
K: Unpin,
impl<K, I> UnsafeUnpin for Debugger<K, I>where
K: UnsafeUnpin,
impl<K, I> UnwindSafe for Debugger<K, I>
Blanket Implementations§
Source§impl<D> Apply<PushToStack<()>> for D
impl<D> Apply<PushToStack<()>> for D
Source§fn apply(&mut self, _: PushToStack<()>)
fn apply(&mut self, _: PushToStack<()>)
Apply a single effect to this destination.
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