java.lang.Object | |
↳ | com.pnfsoftware.jeb.core.units.code.android.controlflow.BasicBlock<InsnType extends com.pnfsoftware.jeb.core.units.code.ILocatedInstruction> |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
BasicBlock()
Create a new empty basic block.
| |||||||||||
BasicBlock(Collection<InsnType> insnlist)
Create a new basic block with the provided instructions.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
add(int index, InsnType insn)
DANGEROUS! Add an instruction to the block.
| ||||||||||
void |
add(InsnType insn)
DANGEROUS! Append an instruction to the block.
| ||||||||||
void |
addAll(Collection<InsnType> insnlist)
DANGEROUS! Append instructions to the block.
| ||||||||||
int |
allinsize()
Get the total number of input edges to this block.
| ||||||||||
int | alloutsize() | ||||||||||
boolean | canThrow() | ||||||||||
InsnType |
get(int index)
Get the instruction at the specified index.
| ||||||||||
long | getAddress() | ||||||||||
long | getAddressOfInstruction(int index) | ||||||||||
List<BasicBlock<InsnType>> | getAllInputBlocks() | ||||||||||
Iterable<BasicBlock<InsnType>> |
getAllInputs()
Retrieve a read-only iterable of regular and irregular input blocks.
| ||||||||||
List<BasicBlock<InsnType>> |
getAllOutputBlocks()
Get regular and irregular output blocks.
| ||||||||||
Iterable<BasicBlock<InsnType>> |
getAllOutputs()
Retrieve a read-only iterable of regular and irregular output blocks.
| ||||||||||
long |
getBase()
Address of first instruction in the block.
| ||||||||||
long |
getEndAddress()
Address following the last instruction of the block (ie, last exclusive address).
| ||||||||||
long |
getFirstAddress()
Address of first instruction in the block.
| ||||||||||
int | getIndexOfInstruction(long address, boolean precise) | ||||||||||
int | getIndexOfInstruction(long address) | ||||||||||
BasicBlock<InsnType> |
getInputBlock(int index)
Get a regular input block.
| ||||||||||
List<BasicBlock<InsnType>> |
getInputBlocks()
Get the regular input blocks.
| ||||||||||
List<Long> | getInputOffsets() | ||||||||||
List<BasicBlock<InsnType>> |
getInputs()
Retrieve a read-only list of input blocks (regular).
| ||||||||||
InsnType |
getInstruction(long address)
Get the instruction located at the exact address.
| ||||||||||
List<InsnType> |
getInstructions()
Get a copy of the list of instructions that make up this basic block.
| ||||||||||
BasicBlock<InsnType> |
getIrregularInputBlock(int index)
Get an irregular input block.
| ||||||||||
List<BasicBlock<InsnType>> | getIrregularInputBlocks() | ||||||||||
List<Long> | getIrregularInputOffsets() | ||||||||||
List<BasicBlock<InsnType>> |
getIrregularInputs()
Retrieve a read-only list of irregular input blocks.
| ||||||||||
BasicBlock<InsnType> |
getIrregularOutputBlock(int index)
Get an irregular output block.
| ||||||||||
List<BasicBlock<InsnType>> |
getIrregularOutputBlocks()
Get irregular output blocks.
| ||||||||||
List<Long> | getIrregularOutputOffsets() | ||||||||||
List<BasicBlock<InsnType>> |
getIrregularOutputs()
Retrieve a read-only list of irregular output blocks.
| ||||||||||
InsnType |
getLast()
Get the last instruction of the block.
| ||||||||||
long |
getLastAddress()
Address of last instruction in the block.
| ||||||||||
BasicBlock<InsnType> |
getOutputBlock(int index)
Get a regular output block.
| ||||||||||
List<BasicBlock<InsnType>> |
getOutputBlocks()
Get the regular output blocks.
| ||||||||||
List<Long> | getOutputOffsets() | ||||||||||
List<BasicBlock<InsnType>> |
getOutputs()
Retrieve a read-only list of output blocks (regular).
| ||||||||||
int | getSizeOfInstructions() | ||||||||||
int |
insize()
Get the number of regular input edges to this block.
| ||||||||||
int |
irrinsize()
Get the number of irregular input edges to this block.
| ||||||||||
int | irroutsize() | ||||||||||
boolean |
isEmpty()
Determine if the block has 0 instruction.
| ||||||||||
Iterator<InsnType> | iterator() | ||||||||||
int | outsize() | ||||||||||
InsnType |
remove(int index)
DANGEROUS! Remove an instruction from the block.
| ||||||||||
void |
removeAll()
DANGEROUS! Remove all instructions from the block.
| ||||||||||
InsnType |
set(int index, InsnType insn)
Replace an instruction.
| ||||||||||
InsnType |
set(int index, InsnType insn, boolean verifySize, boolean verifyOffset)
Replace an instruction.
| ||||||||||
int |
size()
Get the number of instructions in the block.
| ||||||||||
String | toString() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.pnfsoftware.jeb.core.units.code.IBasicBlock
| |||||||||||
From interface
java.lang.Iterable
|
Create a new empty basic block.
Create a new basic block with the provided instructions.
DANGEROUS! Add an instruction to the block.
The instruction is inserted in the block. The edges are not updated.
The caller is responsible for maintaining the consistency of the block and of the CFG.
index | insertion index |
---|---|
insn | the instruction to be inserted |
DANGEROUS! Append an instruction to the block.
The instruction is appended to the block. The edges are not updated.
The caller is responsible for maintaining the consistency of the block and of the CFG.
insn | the instruction to be appended |
---|
DANGEROUS! Append instructions to the block.
The instructions are appended to the block. The edges are not updated.
The caller is responsible for maintaining the consistency of the block and of the CFG.
insnlist | the collection of instructions to be appended |
---|
Get the total number of input edges to this block.
Get the instruction at the specified index.
Retrieve a read-only iterable of regular and irregular input blocks.
NOTE: This method is faster than getAllInputBlocks()
since it does not provide
a copy of the list.
Get regular and irregular output blocks.
Retrieve a read-only iterable of regular and irregular output blocks.
NOTE: This method is faster than getAllOutputBlocks()
since it does not
provide a copy of the list.
Address of first instruction in the block.
Address following the last instruction of the block (ie, last exclusive address).
Address of first instruction in the block.
Get a regular input block.
index | block index |
---|
Get the regular input blocks.
Retrieve a read-only list of input blocks (regular).
NOTE: This method is faster than getInputBlocks()
since it does not provide a copy
of the list.
Get the instruction located at the exact address.
Get a copy of the list of instructions that make up this basic block.
Get an irregular input block.
index | block index |
---|
Retrieve a read-only list of irregular input blocks.
NOTE: This method is faster than getIrregularInputBlocks()
since it does not provide
a copy of the list.
Get irregular output blocks.
Retrieve a read-only list of irregular output blocks.
NOTE: This method is faster than getIrregularOutputBlocks()
since it does not
provide a copy of the list.
Get the last instruction of the block.
Address of last instruction in the block.
Get the regular output blocks.
Retrieve a read-only list of output blocks (regular).
NOTE: This method is faster than getOutputBlocks()
since it does not provide a copy
of the list.
Get the number of regular input edges to this block.
Get the number of irregular input edges to this block.
Determine if the block has 0 instruction.
DANGEROUS! Remove an instruction from the block.
The instruction is removed from the block. The edges are not updated. The block may end up
empty.
DANGEROUS! Remove all instructions from the block.
The edges are not updated. The block may end up empty.
Replace an instruction. The size is validated, the offset is not validated.
index | index in the block |
---|---|
insn | instruction to set at index |
Replace an instruction. The size and offset may be validated.
index | index in the block |
---|---|
insn | instruction to set at index |
verifySize | if false, validating and updating the instruction size is the responsibility of the caller; else, the size is validated and must match the replaced instruction's |
verifyOffset | if false, validating and updating the instruction offset is the responsibility of the caller; else, the offset is validated and must match the replaced instruction's |
Get the number of instructions in the block.