pub struct Instruction<'a> { /* private fields */ }
Expand description
Wrapper structure for a qemu_plugin_insn *
§Safety
This structure is safe to use as long as the pointer is valid. The pointer is always opaque, and therefore may not be dereferenced.
Implementations§
Source§impl<'a> Instruction<'a>
impl<'a> Instruction<'a>
Sourcepub fn data(&self) -> Vec<u8> ⓘ
pub fn data(&self) -> Vec<u8> ⓘ
Returns the data for this instruction. This method may only be called inside the callback in which the instruction is obtained, but the resulting data is owned.
Sourcepub fn symbol(&self) -> Result<Option<String>>
pub fn symbol(&self) -> Result<Option<String>>
Returns the symbol associated with this instruction, if one exists and the binary contains a symbol table
Sourcepub fn register_execute_callback<F>(&self, cb: F)
pub fn register_execute_callback<F>(&self, cb: F)
Register a callback to be run on execution of this instruction
Sourcepub fn register_execute_callback_flags<F>(&self, cb: F, flags: CallbackFlags)
pub fn register_execute_callback_flags<F>(&self, cb: F, flags: CallbackFlags)
Register a callback to be run on execution of this instruction
Sourcepub fn register_memory_access_callback<F>(&self, cb: F, rw: MemRW)
pub fn register_memory_access_callback<F>(&self, cb: F, rw: MemRW)
Register a callback to be run on memory access of this instruction
§Arguments
cb
: The callback to be runrw
: The type of memory access to trigger the callback on
Sourcepub fn register_memory_access_callback_flags<F>(
&self,
cb: F,
rw: MemRW,
flags: CallbackFlags,
)
pub fn register_memory_access_callback_flags<F>( &self, cb: F, rw: MemRW, flags: CallbackFlags, )
Register a callback to be run on memory access of this instruction
§Arguments
cb
: The callback to be runrw
: The type of memory access to trigger the callback on
Auto Trait Implementations§
impl<'a> Freeze for Instruction<'a>
impl<'a> RefUnwindSafe for Instruction<'a>
impl<'a> Send for Instruction<'a>
impl<'a> Sync for Instruction<'a>
impl<'a> Unpin for Instruction<'a>
impl<'a> UnwindSafe for Instruction<'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
Mutably borrows from an owned value. Read more