[][src]Struct falcon::il::Function

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 - A ControlFlowGraph 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: usize) -> Result<&Block>[src]

Return a Block from this Function's ControlFlowGraph by index.

pub fn block_mut(&mut self, index: usize) -> Result<&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: usize, tail: usize) -> Result<&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<usize>[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<usize>)[src]

Trait Implementations

impl Clone for Function[src]

impl Debug for Function[src]

impl<'de> Deserialize<'de> for Function[src]

impl Eq for Function[src]

impl Hash for Function[src]

impl PartialEq<Function> for Function[src]

impl Serialize for Function[src]

impl StructuralEq for Function[src]

impl StructuralPartialEq for Function[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.