Struct qemu_plugin::Instruction
source · 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_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
Auto Trait Implementations§
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