Struct libafl_cc::cfg::ControlFlowGraph
source · pub struct ControlFlowGraph<T>where
T: HasWeight<T>,{ /* private fields */ }
Expand description
An LLVM style control flow graph. Note: This does not track across functions.
Implementations§
source§impl<T> ControlFlowGraph<T>where
T: HasWeight<T>,
impl<T> ControlFlowGraph<T>where T: HasWeight<T>,
source§impl<T> ControlFlowGraph<T>where
T: HasWeight<T>,
impl<T> ControlFlowGraph<T>where T: HasWeight<T>,
sourcepub fn from_file(file_name: &str) -> ControlFlowGraph<T>
pub fn from_file(file_name: &str) -> ControlFlowGraph<T>
Load a CFG from a dump file generated by AFLCoverage
pass.
sourcepub fn from_content(content: &str) -> ControlFlowGraph<T>
pub fn from_content(content: &str) -> ControlFlowGraph<T>
Load a CFG from string generated by AFLCoverage
pass.
sourcepub fn get_edge(&self, xored_loc: usize) -> Option<&CfgEdge<T>>
pub fn get_edge(&self, xored_loc: usize) -> Option<&CfgEdge<T>>
Get the edge at the index of the coverage map AFL inserts to.
sourcepub fn get_edge_mut(&mut self, xored_loc: usize) -> Option<&mut CfgEdge<T>>
pub fn get_edge_mut(&mut self, xored_loc: usize) -> Option<&mut CfgEdge<T>>
Get the mutable edge at the index of the coverage map AFL inserts to.
sourcepub fn get_entry(&self, func_name: &str) -> Option<&EntryBasicBlockInfo>
pub fn get_entry(&self, func_name: &str) -> Option<&EntryBasicBlockInfo>
Get entry basic block information of a function.
sourcepub fn get_entry_mut(
&mut self,
func_name: &str
) -> Option<&mut EntryBasicBlockInfo>
pub fn get_entry_mut( &mut self, func_name: &str ) -> Option<&mut EntryBasicBlockInfo>
Get mutable entry basic block information of a function.
Trait Implementations§
Auto Trait Implementations§
impl<T> RefUnwindSafe for ControlFlowGraph<T>where T: RefUnwindSafe,
impl<T> Send for ControlFlowGraph<T>where T: Send,
impl<T> Sync for ControlFlowGraph<T>where T: Sync,
impl<T> Unpin for ControlFlowGraph<T>where T: Unpin,
impl<T> UnwindSafe for ControlFlowGraph<T>where T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more