pub struct Function {
pub address: u32,
pub header: MethodHeader,
pub instructions: Vec<Instruction>,
pub handlers: Vec<ExceptionHandler>,
pub code_end: u32,
pub extent: Extent,
pub size: u32,
pub stray_branches: Vec<StrayBranch>,
}Expand description
A disassembled function.
Fields§
§address: u32Code pool address of the function’s method header.
header: MethodHeaderThe method header.
instructions: Vec<Instruction>The instructions, in ascending order of offset.
handlers: Vec<ExceptionHandler>The exception table.
code_end: u32Offset just past the last decoded instruction.
extent: ExtentHow the extent of the code was established.
size: u32Total size in bytes: header, code, exception table, and debug records, plus any zero padding that follows the code.
stray_branches: Vec<StrayBranch>Branches that do not land on the start of an instruction.
Implementations§
Source§impl Function
impl Function
Sourcepub fn end_address(&self) -> u32
pub fn end_address(&self) -> u32
Code pool address just past the function’s code.
Sourcepub fn tail_address(&self) -> u32
pub fn tail_address(&self) -> u32
Code pool address just past everything that belongs to the function: its code, exception table, and debug records.
Sourcepub fn function_references(&self) -> impl Iterator<Item = u32> + '_
pub fn function_references(&self) -> impl Iterator<Item = u32> + '_
Code pool addresses of the functions this function refers to.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Function
impl Freeze for Functionwhere
*const u8 is !null: Freeze,
PhantomData<Instruction>: Freeze,
PhantomData<ExceptionHandler>: Freeze,
PhantomData<StrayBranch>: Freeze,
impl Move for Function
impl RefUnwindSafe for Function
impl Send for Functionwhere
RawVecInner: Send,
impl Sync for Functionwhere
RawVecInner: Sync,
impl Unpin for Function
impl UnsafeUnpin for Functionwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Instruction>: UnsafeUnpin,
PhantomData<ExceptionHandler>: UnsafeUnpin,
PhantomData<StrayBranch>: UnsafeUnpin,
impl UnwindSafe for Functionwhere
RawVecInner: 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