com.pnfsoftware.jeb.core.units.code.IControlFlowGraph<InsnType extends com.pnfsoftware.jeb.core.units.code.IInstruction, Block extends com.pnfsoftware.jeb.core.units.code.IBasicBlock<InsnType>> |
Known Indirect Subclasses
CFG<InsnType extends IInstruction>
|
Generic interface for control flow graph (CFG) objects.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract Iterable<AddressableInstruction<InsnType>> |
addressableInstructions()
Get an instruction-with-address iterator.
| ||||||||||
abstract Block |
get(int index)
Retrieve a basic block.
| ||||||||||
abstract Block | getBlock(int index) | ||||||||||
abstract Block |
getBlockAt(long address)
Get the basic block that starts at the provided address or offset.
| ||||||||||
abstract Block | getBlockByLastAddress(long address) | ||||||||||
abstract Block |
getBlockContaining(long address)
Get the basic block that contains the provided address.
| ||||||||||
abstract Block |
getBlockEndingAt(long address)
Get the basic block that ends on the provided address.
| ||||||||||
abstract List<Block> |
getBlocks()
Get a copy of the block list of the CFG.
| ||||||||||
abstract List<Block> |
getBlocksView()
Get a read-only view of the list of blocks for this CFG.
| ||||||||||
abstract int |
getEffectiveSize()
Calculate the 'effective' size of this CFG, that is, the sum of the size of each basic block.
| ||||||||||
abstract long |
getEndAddress()
Routine highest address (exclusive).
| ||||||||||
abstract long |
getEntryAddress()
Routine entry-point address.
| ||||||||||
abstract Block |
getEntryBlock()
Get the entry block.
| ||||||||||
abstract List<Block> |
getExitBlocks()
Get the ordered list of exit blocks.
| ||||||||||
abstract long |
getFirstAddress()
Routine lowest address (inclusive).
| ||||||||||
abstract void |
getGraphRepresentation(List<int[]> edges, List<int[]> irregularEdges)
Get the a graph representation of the CFG.
| ||||||||||
abstract InsnType |
getInstruction(long address)
Get the instruction located at the exact address.
| ||||||||||
abstract int |
getInstructionCount()
Get the total number of instructions in the CFG.
| ||||||||||
abstract Couple<Block, Integer> |
getInstructionLocation(long address)
Locate an instruction.
| ||||||||||
abstract List<InsnType> |
getInstructions()
Get the instruction list of this CFG by aggregating each instruction of every block.
| ||||||||||
abstract long |
getLastAddress()
Routine highest address (inclusive).
| ||||||||||
abstract int | indexOf(Block b) | ||||||||||
abstract Iterable<InsnType> |
instructions()
Get an instruction iterator.
| ||||||||||
abstract int |
size()
Get the number of blocks.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
java.lang.Iterable
|
Get an instruction-with-address iterator. Also see instructions()
.
remove
)
Retrieve a basic block.
Get the basic block that starts at the provided address or offset.
address | the block address/offset |
---|
Get the basic block that contains the provided address.
Note that the address just needs to be in the block address range; it does not need to point to the beginning of an instruction within the block
address | an address within the block |
---|
Get the basic block that ends on the provided address.
address | wanted block end address (exclusive) |
---|
Get a copy of the block list of the CFG. The list is ordered by ascending block address. Modifying the list does not impact the CFG.
Get a read-only view of the list of blocks for this CFG. The list is ordered by ascending block address.
Calculate the 'effective' size of this CFG, that is, the sum of the size of each basic block.
Routine highest address (exclusive).
Routine entry-point address. Note that this address may not be the lowest one in the CFG.
Get the entry block. The entry block is unique.
Get the ordered list of exit blocks. A CFG may have zero or more exit blocks; CFG representing standard routines will have at least one (generally one) exit block.
Routine lowest address (inclusive). Note that this address may not be the entry-point address for this routine.
Get the a graph representation of the CFG. The list of edges use a 1-based node numbering scheme.
edges | (output) array of regular edges, eg: {{1,2},{1,3},{2,3}} |
---|---|
irregularEdges | (output) array of irregular edges |
Get the instruction located at the exact address.
Get the total number of instructions in the CFG. This method sums the number of instructions of each block of the CFG.
Locate an instruction.
address | instruction address |
---|
Get the instruction list of this CFG by aggregating each instruction of every block. The list is ordered by ascending address/offset.
Routine highest address (inclusive).
Get an instruction iterator. Also see addressableInstructions()
.
remove
)
Get the number of blocks.