java.lang.Object | |
↳ | com.pnfsoftware.jeb.core.units.code.asm.cfg.AbstractCFGReorganizer<InsnType extends com.pnfsoftware.jeb.core.units.code.IInstruction> |
Facility for CFG graph nodes reordering. Trampoline blocks will be created to ensure the original execution flow is maintained.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AbstractCFGReorganizer(CFG<InsnType> cfg) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Map<Long, Long> |
getConversionMap()
Retrieve a map holding the old offsets to their corresponding new offsets, in the reorganized
CFG.
| ||||||||||
CFG<InsnType> |
getReorganizedCfg()
Retrieve a CFG reorganized by
reorder(int[]) . | ||||||||||
CFG<InsnType> | reorder(int[] newOrder) |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract CFG<InsnType> | buildCFG(List<InsnType> statements) | ||||||||||
abstract boolean |
canFallthrough(InsnType insn)
Determine if the provided instruction is a flow breaker that falls-through (or may, if it's a
conditional branch) into the first instruction of the next block.
| ||||||||||
abstract InsnType | createNop(int insnSize) | ||||||||||
abstract InsnType |
createTrampoline(long tempTarget)
Create a trampoline instruction whose size must be 1.
| ||||||||||
abstract boolean |
hasTargets(InsnType insn)
Determine whether the instruction has targets that may be updated.
| ||||||||||
abstract void | updateTargets(InsnType insn, Map<Long, Long> map) | ||||||||||
abstract void | updateTrampolineTarget(InsnType insn, long target) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Retrieve a map holding the old offsets to their corresponding new offsets, in the reorganized CFG.
newOrder | an array of 0-based indices from 0 to n-1; providing [0, 1, ..., n-1] does nothing |
---|
Determine if the provided instruction is a flow breaker that falls-through (or may, if it's a conditional branch) into the first instruction of the next block.
Create a trampoline instruction whose size must be 1.
Determine whether the instruction has targets that may be updated.
insn | must be a trampoline instruction |
---|