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]
impl Function
pub fn new(address: u64, control_flow_graph: ControlFlowGraph) -> Function
[src]
pub fn new(address: u64, control_flow_graph: ControlFlowGraph) -> Function
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]
pub fn locations(&self) -> Vec<RefFunctionLocation>
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]
pub fn address(&self) -> u64
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: usize) -> Result<&Block>
[src]
pub fn block(&self, index: usize) -> Result<&Block>
Return a Block
from this Function
's ControlFlowGraph
by index.
pub fn block_mut(&mut self, index: usize) -> Result<&mut Block>
[src]
pub fn block_mut(&mut self, index: usize) -> Result<&mut Block>
Return a mutable reference to a Block
in this Function
pub fn blocks(&self) -> Vec<&Block>
[src]
pub fn blocks(&self) -> Vec<&Block>
Return a Vec of all Block
in this Function
pub fn blocks_mut(&mut self) -> Vec<&mut Block>
[src]
pub fn blocks_mut(&mut self) -> Vec<&mut Block>
Return a Vec of mutable references to all Block
in this Function
pub fn edge(&self, head: usize, tail: usize) -> Result<&Edge>
[src]
pub fn edge(&self, head: usize, tail: usize) -> Result<&Edge>
Return an Edge
from this Function
's ControlFlowGraph
by index.
pub fn edges(&self) -> Vec<&Edge>
[src]
pub fn edges(&self) -> Vec<&Edge>
Return a vec of all Edge
in this Function
pub fn control_flow_graph(&self) -> &ControlFlowGraph
[src]
pub fn control_flow_graph(&self) -> &ControlFlowGraph
Return the ControlFlowGraph
for this Function
.
pub fn control_flow_graph_mut(&mut self) -> &mut ControlFlowGraph
[src]
pub fn control_flow_graph_mut(&mut self) -> &mut ControlFlowGraph
Return a mutable reference to the ControlFlowGraph
for this Function
.
pub fn name(&self) -> String
[src]
pub fn name(&self) -> String
Return the name of this Function
.
pub fn set_name(&mut self, name: Option<String>)
[src]
pub fn set_name(&mut self, name: Option<String>)
Set this Function
's name.
pub fn index(&self) -> Option<usize>
[src]
pub fn index(&self) -> Option<usize>
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<usize>)
[src]
pub fn set_index(&mut self, index: Option<usize>)
Trait Implementations
impl Clone for Function
[src]
impl Clone for Function
fn clone(&self) -> Function
[src]
fn clone(&self) -> Function
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Function
[src]
impl Debug for Function
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Hash for Function
[src]
impl Hash for Function
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
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]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Eq for Function
[src]
impl Eq for Function
impl PartialEq for Function
[src]
impl PartialEq for Function