pub struct ControlFlowGraph {
pub graph: DiGraph<BasicBlock, EdgeType>,
pub loops: Vec<LoopInfo>,
pub dominators: Option<Dominators<NodeIndex>>,
/* private fields */
}Expand description
Control Flow Graph with proper basic block analysis
Fields§
§graph: DiGraph<BasicBlock, EdgeType>§loops: Vec<LoopInfo>Detected loops in the CFG
dominators: Option<Dominators<NodeIndex>>Dominator tree information
Implementations§
Source§impl ControlFlowGraph
impl ControlFlowGraph
pub fn new() -> Self
Sourcepub fn build_from_analysis(analysis: &BinaryAnalysis) -> Result<Self, String>
pub fn build_from_analysis(analysis: &BinaryAnalysis) -> Result<Self, String>
Build CFG from binary analysis with Capstone disassembly
Sourcepub fn analyze_call_graph(&self, analysis: &BinaryAnalysis) -> CallGraphAnalysis
pub fn analyze_call_graph(&self, analysis: &BinaryAnalysis) -> CallGraphAnalysis
Analyze call graph relationships
Sourcepub fn get_loop_headers(&self) -> Vec<u64>
pub fn get_loop_headers(&self) -> Vec<u64>
Get basic blocks that are loop headers
Sourcepub fn is_in_loop(&self, address: u64) -> bool
pub fn is_in_loop(&self, address: u64) -> bool
Check if an address is in a loop
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ControlFlowGraph
impl RefUnwindSafe for ControlFlowGraph
impl Send for ControlFlowGraph
impl Sync for ControlFlowGraph
impl Unpin for ControlFlowGraph
impl UnwindSafe for ControlFlowGraph
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