pub struct Function<I> {
pub addr: VAddr,
pub name: String,
pub blocks: Vec<BasicBlock<I>>,
}Expand description
A function: a name, an entry address, and a sequence of basic blocks in original layout (address) order.
blocks[0] is by convention the entry block, since blocks are stored
in address order and a function starts at its lowest address.
Fields§
§addr: VAddr§name: String§blocks: Vec<BasicBlock<I>>Implementations§
Source§impl<I: ArchInsn> Function<I>
impl<I: ArchInsn> Function<I>
Sourcepub fn emit_bytes(&self) -> Vec<u8> ⓘ
pub fn emit_bytes(&self) -> Vec<u8> ⓘ
Concatenate every instruction’s preserved bytes in address order. For any function lifted from real bytes, this returns exactly the input bytes.
Sourcepub fn block_at(&self, addr: VAddr) -> Option<&BasicBlock<I>>
pub fn block_at(&self, addr: VAddr) -> Option<&BasicBlock<I>>
Find the block whose address equals addr, if any.
Trait Implementations§
Auto Trait Implementations§
impl<I> Freeze for Function<I>
impl<I> RefUnwindSafe for Function<I>where
I: RefUnwindSafe,
impl<I> Send for Function<I>where
I: Send,
impl<I> Sync for Function<I>where
I: Sync,
impl<I> Unpin for Function<I>where
I: Unpin,
impl<I> UnsafeUnpin for Function<I>
impl<I> UnwindSafe for Function<I>where
I: UnwindSafe,
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