Class InstructionHints
java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.items.InstructionHints
Hints for concrete instruction items.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the prototype associated with a callsite target.Get the stack-pointer delta after the execution of an instruction.intGet value indicating whether branching instruction may be a switch dispatcher (heuristic).booleanDetermine whether the instruction is known to be an actual call.booleanDetermine whether the instruction should be treated as a conditional tail call.booleanDetermine whether custom branching behavior is present.booleanDetermine whether the instruction is a fake call.booleanDetermine whether the instruction should be treated as a tail call.voidsetActualCall(boolean isActualCall) Set whether the instruction is known to be an actual call.voidsetCallsitePrototype(IPrototypeItem callsiteProto) Set the prototype associated with a callsite target.voidsetCondTailCall(boolean isCondTailCall) Set whether the instruction should be treated as a conditional tail call.voidsetFakeCall(boolean isFakeCall) Set whether the instruction is a fake call.voidsetStackPointerDelta(Integer spDelta) Set the stack-pointer delta after the execution of an instruction.voidsetSwitchDispatcher(int switchDispatcher) Set whether the branching instruction may be a switch dispatcher.voidsetTailCall(boolean isTailCall) Set whether the instruction should be treated as a tail call.
-
Constructor Details
-
InstructionHints
public InstructionHints()Create empty instruction hints.
-
-
Method Details
-
setStackPointerDelta
Set the stack-pointer delta after the execution of an instruction. Typically, this is used on branching instructions to dynamic callsites that have not been determined automatically.- Parameters:
spDelta- a delta; null to remove
-
getStackPointerDelta
Get the stack-pointer delta after the execution of an instruction.- Returns:
- an integer or null if none
-
setCallsitePrototype
Set the prototype associated with a callsite target. Typically, this is used on branching instructions instructions to dynamic callsites that have not been determined automatically.- Parameters:
callsiteProto- a prototype; null to remove
-
getCallsitePrototype
Get the prototype associated with a callsite target.- Returns:
- a prototype or null if none
-
isTailCall
public boolean isTailCall()Determine whether the instruction should be treated as a tail call.- Returns:
- true for a tail call
-
setTailCall
public void setTailCall(boolean isTailCall) Set whether the instruction should be treated as a tail call.- Parameters:
isTailCall- true for a tail call
-
isCondTailCall
public boolean isCondTailCall()Determine whether the instruction should be treated as a conditional tail call.- Returns:
- true for a conditional tail call
-
setCondTailCall
public void setCondTailCall(boolean isCondTailCall) Set whether the instruction should be treated as a conditional tail call.- Parameters:
isCondTailCall- true for a conditional tail call
-
getSwitchDispatcher
public int getSwitchDispatcher()Get value indicating whether branching instruction may be a switch dispatcher (heuristic).- Returns:
- 0:no, 1: yes, not processed, 2: yes, processed
-
setSwitchDispatcher
public void setSwitchDispatcher(int switchDispatcher) Set whether the branching instruction may be a switch dispatcher.- Parameters:
switchDispatcher- 0:no, 1: yes, not processed, 2: yes, processed
-
isFakeCall
public boolean isFakeCall()Determine whether the instruction is a fake call.- Returns:
- true if instruction is a routine call that should be considered as an intra-routine branch, false otherwise.
-
setFakeCall
public void setFakeCall(boolean isFakeCall) Set whether the instruction is a fake call.- Parameters:
isFakeCall- true for a fake call
-
isActualCall
public boolean isActualCall()Determine whether the instruction is known to be an actual call.- Returns:
- true for an actual call
-
setActualCall
public void setActualCall(boolean isActualCall) Set whether the instruction is known to be an actual call.- Parameters:
isActualCall- true for an actual call
-
isCustomBranchingInstruction
public boolean isCustomBranchingInstruction()Determine whether custom branching behavior is present.- Returns:
- true if any custom branching hint is set
-