Struct FunctionSearchOptions

Source
pub struct FunctionSearchOptions<'a> {
    pub start_address: Option<u32>,
    pub last_function_address: Option<u32>,
    pub end_address: Option<u32>,
    pub max_function_start_search_distance: u32,
    pub use_data_as_upper_bound: bool,
    pub function_addresses: Option<BTreeSet<u32>>,
    pub existing_functions: Option<&'a BTreeMap<u32, Function>>,
    pub check_defs_uses: bool,
}

Fields§

§start_address: Option<u32>

Address to start searching from. Defaults to the base address.

§last_function_address: Option<u32>

Last address that a function can start from. Defaults to Self::end_address.

§end_address: Option<u32>

Address to end the search. Defaults to the base address plus code size.

§max_function_start_search_distance: u32

If zero, end the search when an illegal starting instruction is found. Otherwise, continue searching for a valid function start for up to this many bytes. Set to u32::MAX to search until the end of the module.

§use_data_as_upper_bound: bool

If true, pointers to data will be used to limit the upper bound address.

§function_addresses: Option<BTreeSet<u32>>

Guarantees that all these addresses will be analyzed, even if the function analysis would terminate before they are reached. Used for .init functions. Note: This will override keep_searching_for_valid_function_start, they are not intended to be used together.

§existing_functions: Option<&'a BTreeMap<u32, Function>>

If a branch instruction branches into one of these functions, it will be treated as a function branch instead of inserting a label at the branch destination. If the function branch is unconditional, it will also be treated as a tail call and terminate the analysis of the current function.

§check_defs_uses: bool

Whether to treat instructions using undefined registers as illegal.

Trait Implementations§

Source§

impl<'a> Default for FunctionSearchOptions<'a>

Source§

fn default() -> FunctionSearchOptions<'a>

Returns the “default value” for a type. Read more

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> Same for T

Source§

type Output = T

Should always be Self
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.