java.lang.Object | |
↳ | com.pnfsoftware.jeb.core.units.code.FlowInformation |
Default IFlowInformation
implementation
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | FLAG_COMPUTE_FT | ||||||||||
int | FLAG_NO_FT |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
public static final FlowInformation | EMPTY | Empty flow information: the instruction modifies the flow of execution, but no target is explicitly specified. | |||||||||
public static final FlowInformation | EMPTY_NO_FT | Empty flow information, and implicit fall-through is disabled: the instruction modifies the flow of execution, but no target is explicitly specified. | |||||||||
public static final FlowInformation | NONE | No flow information: the instruction does not modify the flow of execution. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
FlowInformation()
Create an object with an empty target list, no post-compute fall-through, and no delay-slot
(default).
| |||||||||||
FlowInformation(boolean computeFallThrough, int delaySlotCount)
Create an object with an empty target list.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
addTarget(ICodePointer entryPoint)
Add a target to the list of possible targets.
| ||||||||||
void |
addTargets(Collection<? extends ICodePointer> entryPoints)
Add a collection of targets to the list of possible targets.
| ||||||||||
int |
getDelaySlotCount()
Get the number of instructions in the delay slot.
| ||||||||||
List<ICodePointer> |
getTargets()
Get the a list of targets.
| ||||||||||
static boolean | isAddressInTargets(IFlowInformation flowinfo, long address) | ||||||||||
boolean |
isBroken()
Determine if this object does contain flow information.
| ||||||||||
boolean |
isBrokenKnown()
Determine if this object does contain flow information and all targets are known.
| ||||||||||
boolean |
isBrokenUnknown()
Determine if this object does contain flow information but has no known targets.
| ||||||||||
boolean |
mustComputeFallThrough()
Indicate if the flow information includes a fall-through address (relative to the current
instruction) that is not present in the FlowInfo object itself.
| ||||||||||
boolean |
noFallThrough()
Indicate whether this flow information forbids the implicit calculation of a fall-through
edge.
| ||||||||||
void | setComputeFallThrough(boolean enabled) | ||||||||||
void | setDelaySlotCount(int delaySlotCount) | ||||||||||
void | setNoFallThrough(boolean enabled) | ||||||||||
String | toString() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.pnfsoftware.jeb.core.units.code.IFlowInformation
|
Empty flow information: the instruction modifies the flow of execution, but no target is explicitly specified.
Empty flow information, and implicit fall-through is disabled: the instruction modifies the flow of execution, but no target is explicitly specified. This constant is suitable for bad or tentative call-to-subs for which the return-to-caller is uncertain.
No flow information: the instruction does not modify the flow of execution.
Create an object with an empty target list, no post-compute fall-through, and no delay-slot
(default). Note: this object indicates that the flow is changing, regardless of whether of
not the target list will be populated. To indicate no-change in flow, a user should use
NONE
.
Create an object with an empty target list. Note: this object indicates that the flow is
changing, regardless of whether of not the target list will be populated. To indicate
no-change in flow, a user should use NONE
.
Add a collection of targets to the list of possible targets.
Get the number of instructions in the delay slot.
Get the a list of targets. Be careful, this list does not include the fall-through target if
it is implied (eg, when flow-info is returned by getRoutineCall(long)
) or when
its calculation was requested dynamically (via mustComputeFallThrough()
).
Determine if this object does contain flow information.
Determine if this object does contain flow information and all targets are known.
Determine if this object does contain flow information but has no known targets.
IMPORTANT: if this flow info object is mixed (it specifies having unknown target(s), and also bears known targets), this method returns false.
Indicate if the flow information includes a fall-through address (relative to the current instruction) that is not present in the FlowInfo object itself. If this method returns true, the caller must dynamically calculate the fall-through address itself.
Note that the creator of a flowinfo object may decide to add the fall-through (if any) in the flowinfo object target list. However, in some cases, such as branching instructions with delay slot(s), it is simpler to indicate that the branching instruction allows a fall-through flow, but that it should be computed by the client/user, instead of stored or computed by the flowinfo object.
Indicate whether this flow information forbids the implicit calculation of a fall-through
edge. (A fall-through may be explicitly specified as a target
,
regardless.)