public interface

IBasicBlock

implements Iterable<T>
com.pnfsoftware.jeb.core.units.code.IBasicBlock<InsnType extends com.pnfsoftware.jeb.core.units.code.IInstruction>
Known Indirect Subclasses

Class Overview

Generic interface for CFG's basic block objects.

Summary

Public Methods
abstract int allinsize()
Get the total number of input edges to this block.
abstract int alloutsize()
abstract boolean canThrow()
abstract InsnType get(int index)
Get the instruction at the specified index.
abstract long getAddressOfInstruction(int index)
abstract List<? extends IBasicBlock<InsnType>> getAllInputBlocks()
abstract Iterable<? extends IBasicBlock<InsnType>> getAllInputs()
Retrieve a read-only iterable of regular and irregular input blocks.
abstract List<? extends IBasicBlock<InsnType>> getAllOutputBlocks()
Get regular and irregular output blocks.
abstract Iterable<? extends IBasicBlock<InsnType>> getAllOutputs()
Retrieve a read-only iterable of regular and irregular output blocks.
abstract long getBase()
Address of first instruction in the block.
abstract long getEndAddress()
Address following the last instruction of the block (ie, last exclusive address).
abstract long getFirstAddress()
Address of first instruction in the block.
abstract int getIndexOfInstruction(long address)
abstract IBasicBlock<InsnType> getInputBlock(int index)
Get a regular input block.
abstract List<? extends IBasicBlock<InsnType>> getInputBlocks()
Get the regular input blocks.
abstract List<? extends IBasicBlock<InsnType>> getInputs()
Retrieve a read-only list of input blocks (regular).
abstract InsnType getInstruction(long address)
Get the instruction located at the exact address.
abstract List<InsnType> getInstructions()
Get a copy of the list of instructions that make up this basic block.
abstract IBasicBlock<InsnType> getIrregularInputBlock(int index)
Get an irregular input block.
abstract List<? extends IBasicBlock<InsnType>> getIrregularInputBlocks()
abstract List<? extends IBasicBlock<InsnType>> getIrregularInputs()
Retrieve a read-only list of irregular input blocks.
abstract IBasicBlock<InsnType> getIrregularOutputBlock(int index)
Get an irregular output block.
abstract List<? extends IBasicBlock<InsnType>> getIrregularOutputBlocks()
Get irregular output blocks.
abstract List<? extends IBasicBlock<InsnType>> getIrregularOutputs()
Retrieve a read-only list of irregular output blocks.
abstract InsnType getLast()
Get the last instruction of the block.
abstract long getLastAddress()
Address of last instruction in the block.
abstract IBasicBlock<InsnType> getOutputBlock(int index)
Get a regular output block.
abstract List<? extends IBasicBlock<InsnType>> getOutputBlocks()
Get the regular output blocks.
abstract List<? extends IBasicBlock<InsnType>> getOutputs()
Retrieve a read-only list of output blocks (regular).
abstract int getSizeOfInstructions()
abstract int insize()
Get the number of regular input edges to this block.
abstract int irrinsize()
Get the number of irregular input edges to this block.
abstract int irroutsize()
abstract boolean isEmpty()
Determine if the block has 0 instruction.
abstract int outsize()
abstract int size()
Get the number of instructions in the block.
[Expand]
Inherited Methods
From interface java.lang.Iterable

Public Methods

public abstract int allinsize ()

Get the total number of input edges to this block.

public abstract int alloutsize ()

public abstract boolean canThrow ()

public abstract InsnType get (int index)

Get the instruction at the specified index.

public abstract long getAddressOfInstruction (int index)

public abstract List<? extends IBasicBlock<InsnType>> getAllInputBlocks ()

public abstract Iterable<? extends IBasicBlock<InsnType>> getAllInputs ()

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.

public abstract List<? extends IBasicBlock<InsnType>> getAllOutputBlocks ()

Get regular and irregular output blocks.

Returns
  • a copy of the list of all output blocks

public abstract Iterable<? extends IBasicBlock<InsnType>> getAllOutputs ()

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.

public abstract long getBase ()

Address of first instruction in the block.

public abstract long getEndAddress ()

Address following the last instruction of the block (ie, last exclusive address).

public abstract long getFirstAddress ()

Address of first instruction in the block.

public abstract int getIndexOfInstruction (long address)

Parameters
address instruction address
Returns
  • -1 if there is no instruction starting at the provided address

public abstract IBasicBlock<InsnType> getInputBlock (int index)

Get a regular input block.

Parameters
index block index
Returns
  • a block

public abstract List<? extends IBasicBlock<InsnType>> getInputBlocks ()

Get the regular input blocks.

Returns
  • a copy of the list of regular input blocks

public abstract List<? extends IBasicBlock<InsnType>> getInputs ()

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.

public abstract InsnType getInstruction (long address)

Get the instruction located at the exact address.

public abstract List<InsnType> getInstructions ()

Get a copy of the list of instructions that make up this basic block.

public abstract IBasicBlock<InsnType> getIrregularInputBlock (int index)

Get an irregular input block.

Parameters
index block index
Returns
  • a block

public abstract List<? extends IBasicBlock<InsnType>> getIrregularInputBlocks ()

public abstract List<? extends IBasicBlock<InsnType>> getIrregularInputs ()

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.

public abstract IBasicBlock<InsnType> getIrregularOutputBlock (int index)

Get an irregular output block.

public abstract List<? extends IBasicBlock<InsnType>> getIrregularOutputBlocks ()

Get irregular output blocks.

Returns
  • a copy of the list of irregular output blocks

public abstract List<? extends IBasicBlock<InsnType>> getIrregularOutputs ()

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.

public abstract InsnType getLast ()

Get the last instruction of the block.

public abstract long getLastAddress ()

Address of last instruction in the block.

public abstract IBasicBlock<InsnType> getOutputBlock (int index)

Get a regular output block.

public abstract List<? extends IBasicBlock<InsnType>> getOutputBlocks ()

Get the regular output blocks.

Returns
  • a copy of the list of regular output blocks

public abstract List<? extends IBasicBlock<InsnType>> getOutputs ()

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.

public abstract int getSizeOfInstructions ()

public abstract int insize ()

Get the number of regular input edges to this block.

public abstract int irrinsize ()

Get the number of irregular input edges to this block.

public abstract int irroutsize ()

public abstract boolean isEmpty ()

Determine if the block has 0 instruction.

public abstract int outsize ()

public abstract int size ()

Get the number of instructions in the block.