Struct BreakpointEdit
pub struct BreakpointEdit<'a> { /* private fields */ }Expand description
A breakpoint-editing session.
This enables updating breakpoint state (setting or unsetting individual breakpoints or the store-global single-step flag) in a batch. It is more efficient to batch these updates because “re-publishing” the newly patched code, with update breakpoint settings, typically requires a syscall to re-enable execute permissions.
Implementations§
§impl<'a> BreakpointEdit<'a>
impl<'a> BreakpointEdit<'a>
pub fn add_breakpoint(
&mut self,
module: &Module,
pc: ModulePC,
) -> Result<(), Error>
pub fn add_breakpoint( &mut self, module: &Module, pc: ModulePC, ) -> Result<(), Error>
Add a breakpoint in the given module at the given PC in that module.
If the requested PC does not fall exactly on an opcode boundary, the breakpoint is “slipped” forward to the next available opcode PC.
No effect if the breakpoint is already set.
pub fn remove_breakpoint(
&mut self,
module: &Module,
pc: ModulePC,
) -> Result<(), Error>
pub fn remove_breakpoint( &mut self, module: &Module, pc: ModulePC, ) -> Result<(), Error>
Remove a breakpoint in the given module at the given PC in that module.
No effect if the breakpoint was not set.
pub fn single_step(&mut self, enabled: bool) -> Result<(), Error>
pub fn single_step(&mut self, enabled: bool) -> Result<(), Error>
Turn on or off single-step mode.
In single-step mode, a breakpoint event is emitted at every Wasm PC.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for BreakpointEdit<'a>
impl<'a> !RefUnwindSafe for BreakpointEdit<'a>
impl<'a> Send for BreakpointEdit<'a>
impl<'a> Sync for BreakpointEdit<'a>
impl<'a> Unpin for BreakpointEdit<'a>
impl<'a> UnsafeUnpin for BreakpointEdit<'a>
impl<'a> !UnwindSafe for BreakpointEdit<'a>
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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