binaryninja::high_level_il

Struct HighLevelILFunction

source
pub struct HighLevelILFunction { /* private fields */ }

Implementations§

source§

impl HighLevelILFunction

source

pub fn instruction_from_index( &self, index: HighLevelInstructionIndex, ) -> Option<HighLevelILInstruction>

source

pub fn instruction_from_expr_index( &self, expr_index: HighLevelInstructionIndex, ) -> Option<HighLevelILInstruction>

source

pub fn root_instruction_index(&self) -> HighLevelInstructionIndex

source

pub fn root(&self) -> HighLevelILInstruction

source

pub fn set_root(&self, new_root: &HighLevelILInstruction)

source

pub fn instruction_count(&self) -> usize

source

pub fn expression_count(&self) -> usize

source

pub fn ssa_form(&self) -> HighLevelILFunction

source

pub fn function(&self) -> Ref<Function>

source

pub fn basic_blocks(&self) -> Array<BasicBlock<HighLevelILBlock>>

source

pub fn as_ast(&self) -> Ref<HighLevelILFunction>

source

pub fn as_non_ast(&self) -> Ref<HighLevelILFunction>

source

pub fn current_address(&self) -> Location

source

pub fn set_current_address(&self, location: impl Into<Location>)

source

pub fn ssa_variable_definition( &self, variable: SSAVariable, ) -> Option<HighLevelILInstruction>

Gets the instruction that contains the given SSA variable’s definition.

Since SSA variables can only be defined once, this will return the single instruction where that occurs. For SSA variable version 0s, which don’t have definitions, this will return None instead.

source

pub fn ssa_memory_definition( &self, version: usize, ) -> Option<HighLevelILInstruction>

source

pub fn ssa_variable_uses( &self, variable: SSAVariable, ) -> Array<HighLevelILInstruction>

Gets all the instructions that use the given SSA variable.

source

pub fn ssa_memory_uses(&self, version: usize) -> Array<HighLevelILInstruction>

source

pub fn is_ssa_variable_live(&self, variable: SSAVariable) -> bool

Determines if variable is live at any point in the function

source

pub fn is_ssa_variable_live_at( &self, variable: SSAVariable, instr: &HighLevelILInstruction, ) -> bool

Determines if variable is live at a given point in the function

source

pub fn variable_definitions( &self, variable: Variable, ) -> Array<HighLevelILInstruction>

source

pub fn variable_uses(&self, variable: Variable) -> Array<HighLevelILInstruction>

source

pub fn is_variable_live_at( &self, variable: Variable, instr: &HighLevelILInstruction, ) -> bool

Determines if variable is live at a given point in the function

source

pub fn variables(&self) -> Array<Variable>

This gets just the HLIL variables - you may be interested in the union of Function::parameter_variables and HighLevelILFunction::aliased_variables as well for all the variables used in the function

source

pub fn aliased_variables(&self) -> Array<Variable>

This returns a list of Variables that are taken reference to and used elsewhere. You may also wish to consider HighLevelILFunction::variables and Function::parameter_variables

source

pub fn ssa_variables(&self, variable: &Variable) -> Array<SSAVariable>

This gets the HLIL SSA variables for a given Variable.

Trait Implementations§

source§

impl Debug for HighLevelILFunction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for HighLevelILFunction

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for HighLevelILFunction

source§

fn eq(&self, rhs: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl ToOwned for HighLevelILFunction

source§

type Owned = Ref<HighLevelILFunction>

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> Self::Owned

Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · source§

fn clone_into(&self, target: &mut Self::Owned)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl Eq for HighLevelILFunction

source§

impl Send for HighLevelILFunction

source§

impl Sync for HighLevelILFunction

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.