Struct disassemble::ControlFlowGraph
[−]
[src]
pub struct ControlFlowGraph { pub graph: Graph<BasicBlock, BasicBlockEdge>, pub entry_block: Option<NodeIndex>, pub block_finder: BTreeMap<Address, NodeIndex>, }
Fields
graph: Graph<BasicBlock, BasicBlockEdge>
The Graph
that stores the actual ControlFlowGraph
entry_block: Option<NodeIndex>
The NodeIndex
for the entry BasicBlock
for this function.
block_finder: BTreeMap<Address, NodeIndex>
Map an address to the corresponding basic block.
Methods
impl ControlFlowGraph
[src]
pub fn new<I: Instruction>(instructions: &[I]) -> Self
[src]
Build the ControlFlowGraph from the instructions
.
This is conducted in a 2 step process:
- First, each instruction is examined to identify block boundaries.
- Then, we go through each instruction again, looking for the previously identified block boundaries and build the edges.
This two step process prevents us from having to construct and then subsequently split blocks as we find backward edges.