[−][src]Struct falcon::il::Function
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: 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]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for Function
[src]
impl Hash for Function
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Function> for Function
[src]
impl Serialize for Function
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for Function
[src]
impl StructuralPartialEq for Function
[src]
Auto Trait Implementations
impl RefUnwindSafe for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl UnwindSafe for Function
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,