Struct falcon::il::Function
[−]
[src]
pub struct Function { /* fields omitted */ }
A function for Falcon IL. Provides location and context in a Program
to a
ControlFlowGraph
.
Methods
impl Function
[src]
pub fn new(address: u64, control_flow_graph: ControlFlowGraph) -> Function
[src]
Create a new Function
Parameters
address
- The address where we recovered this function.control_flow_graph
- AControlFlowGraph
capturing the semantics of this function.
pub fn locations(&self) -> Vec<RefFunctionLocation>
[src]
Create a Vec of every RefFunctionLocation for this function.
Convenient for analyses where we need to check every location in a function
pub fn address(&self) -> u64
[src]
Get the address of this Function
.
The address returned will be the address set when this Function
was created,
which should be the virtual address where this Function
was found.
pub fn block(&self, index: u64) -> Option<&Block>
[src]
Return a Block
from this Function
's ControlFlowGraph
by index.
pub fn block_mut(&mut self, index: u64) -> Option<&mut Block>
[src]
Return a mutable reference to a Block
in this Function
pub fn blocks(&self) -> Vec<&Block>
[src]
Return a Vec of all Block
in this Function
pub fn blocks_mut(&mut self) -> Vec<&mut Block>
[src]
Return a Vec of mutable references to all Block
in this Function
pub fn edge(&self, head: u64, tail: u64) -> Option<&Edge>
[src]
Return an Edge
from this Function
's ControlFlowGraph
by index.
pub fn edges(&self) -> Vec<&Edge>
[src]
Return a vec of all Edge
in this Function
pub fn control_flow_graph(&self) -> &ControlFlowGraph
[src]
Return the ControlFlowGraph
for this Function
.
pub fn control_flow_graph_mut(&mut self) -> &mut ControlFlowGraph
[src]
Return a mutable reference to the ControlFlowGraph
for this Function
.
pub fn name(&self) -> String
[src]
Return the name of this Function
.
pub fn set_name(&mut self, name: Option<String>)
[src]
Set this Function
's name.
pub fn index(&self) -> Option<u64>
[src]
Return the index of this Function
. A Function
will have an index if
it is added to a Program
.
pub fn set_index(&mut self, index: Option<u64>)
[src]
Trait Implementations
impl Clone for Function
[src]
fn clone(&self) -> Function
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Function
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Eq for Function
[src]
impl Hash for Function
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Ord for Function
[src]
fn cmp(&self, __arg_0: &Function) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl PartialEq for Function
[src]
fn eq(&self, __arg_0: &Function) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Function) -> bool
[src]
This method tests for !=
.
impl PartialOrd for Function
[src]
fn partial_cmp(&self, __arg_0: &Function) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Function) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Function) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Function) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Function) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more