Interface IECall
- All Superinterfaces:
IEGeneric
,IEStatement
,IInstruction
,IInstructionOperand
,IResizableInstruction
IR statement used to represent calls to sub-routines.
Default memory access information
is set to null to indicate it
should be determined by the IR itself.
-
Field Summary
Fields inherited from interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEStatement
FLAG_LIKELY_EPILOGUE, FLAG_LIKELY_PROLOGUE, FLAG_OPT_BLOCK_PROPAGATION, FLAG_OPT_BLOCK_SUBSTITUTIONS
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSpoiledVariables
(List<IEVar> spoiledVariables) Use only if a dummy/failsafe prototype was setgetArgument
(int index) Get the Nth argument of this ECall.Retrieve a read-only list of arguments provided to this ECall.int
Retrieve the number of arguments.int
Retrieve the number of return values.boolean
getHintArgumentPointsToExternalMemory
(int argIndex) Indicate whether the call is non-returning.getReturnExpression
(int index) Get the Nth return expression of this ECall.Retrieve a read-only list of return expressions.Retrieve the return address for this call.Retrieve a read-only list of expressions spoiled by this ECall.int
boolean
boolean
Retrieve a hint (for the AST generator) indicating whether the return value of this call, if any, appears to be used by subsequent instructions in the CFG.boolean
boolean
void
setCallsite
(IEGeneric callsite) void
setFailsafePrototype
(boolean enabled) boolean
setHintArgumentPointsToExternalMemory
(int argIndex, boolean enabled) void
void
setNonReturning
(Boolean forcedNonReturning) Force the value of the internal non-returning flag to a custom value.void
setPrototype
(IWildcardPrototype prototype, boolean failsafe) Dangerous method, will be removed from API.void
setReturnExpression
(int index, IEGeneric exp) Update a return expression.void
setReturnExpressionUnused
(boolean enabled) Set a hint (for the AST generator) indicating whether the return value of this call, if any, appears to be used by subsequent instructions in the CFG.void
Set the optional return location (address) for the call.void
setStackPointerDeltaAfterExecution
(int delta) Use only if a dummy/failsafe prototype was setvoid
setTentativeCall
(boolean enabled) Methods inherited from interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEGeneric
accessesMemory, addFlags, asCompose, asCond, asGroup, asGroupElt, asImm, asMem, asOperation, asRange, asSlice, asStatement, asVar, bit, copyProperties, countSuccessiveBits, duplicate, equalsEx, evaluate, evaluateAddress, evaluateUnsignedLong, examine, find, findByType, findByType, findParent, findParent, getBitsize, getDefinedOrUsedAsDestination, getExplicitlyUsed, getExplicitlyUsed, getFlags, getPriority, getSafeType, getType, getUsed, getUsed, half, hasFlags, isCompose, isCond, isGroup, isGroupElt, isImm, isMem, isOperation, isOperation, isOperation, isOperation, isRange, isSlice, isSlice, isStatement, isVar, isVar, leftShift, leftShift, lsb, msb, part, removeFlags, replaceSubExpression, replaceVar, rightShift, rightShift, safelyType, setFlags, setType, setType, setType, signExtend, slice, slice, slice, topHalf, updateTypes, verify, visitDepthPost, visitDepthPost, visitDepthPost, visitDepthPre, visitDepthPre, visitDepthPre, zeroExtend
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEStatement
addLowerLevelAddress, addLowerLevelAddresses, asAssign, asCall, asJump, asJumpFar, asNop, asReturn, asSwitch, asUntranslated, collectSubExpressions, collectSubExpressions, collectUsedExpressions, copyLowerLevelAddresses, copyProperties, equalsEx, equalsEx, generateC, getContext, getDefUse, getDefUseInfo, getLowerLevelAddresses, getPrimaryLowerLevelAddress, getSPDelta, isAssign, isAssignTo, isAssignTo, isAssignToVar, isCall, isConditionalJump, isConditionalJumpFar, isJump, isJumpFar, isNop, isReturn, isSwitch, isUnconditionalJump, isUnconditionalJumpFar, isUntranslatedInstruction, postUpdateTypes, preUpdateTypes, removeLowerLevelAddress, replaceDefinedVar, replaceUsedVar, replaceVar, resetLowerLevelAddress, resetLowerLevelAddresses, setLowerLevelAddress, setLowerLevelAddresses, setPrimaryLowerLevelAddress, setSPDelta, visitInstruction, visitInstruction, visitInstructionPostOrder, withLowerLevelAddress, withLowerLevelAddresses, writesMemory
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.IInstruction
canThrow, collectIndirectCallReferences, format, getACS, getBreakingFlow, getCode, getCountOfOperands, getDefUse, getDefUse, getInstructionFlags, getMnemonic, getOperand, getOperands, getPrefix, getPrimaryBranchAddress, getProcessorMode, getRoutineCall, getSize
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.IInstructionOperand
format
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.IResizableInstruction
adjustSize, setSize
-
Method Details
-
setFailsafePrototype
void setFailsafePrototype(boolean enabled) -
isFailsafePrototype
boolean isFailsafePrototype() -
getPrototype
IWildcardPrototype getPrototype() -
setPrototype
Dangerous method, will be removed from API. The prototype compatibility with the current call attributes (returns, params, etc.) is not verified.- Parameters:
prototype
-failsafe
-
-
getCallSite
IEGeneric getCallSite() -
setCallsite
-
isStaticCallsite
boolean isStaticCallsite() -
getStaticCallsite
INativeMethodItem getStaticCallsite() -
getDynamicTargetCandidates
-
getReturnLocation
IEGeneric getReturnLocation()Retrieve the return address for this call. The return address may be null if the call-to-sub is a regular call that returns at the subsequent instruction.- Returns:
- the return address, possibly null
-
setReturnLocation
Set the optional return location (address) for the call. Null means a normal call, i.e., the return address is the address that immediately follows the call.- Parameters:
loc
- the optional return address
-
getCountOfReturns
int getCountOfReturns()Retrieve the number of return values.- Returns:
-
getReturnExpressions
Retrieve a read-only list of return expressions. In most cases, the list will return 0 or 1 arguments.- Returns:
-
getReturnExpression
Get the Nth return expression of this ECall. This method is safe and will return null if the index is out of bounds.- Parameters:
index
-- Returns:
-
setReturnExpression
Update a return expression.- Parameters:
index
- the index must be valid, i.e. be in the [0, count_returns) range else the method will throwexp
- non-null IRE
-
getCountOfArguments
int getCountOfArguments()Retrieve the number of arguments.- Returns:
-
getArguments
Retrieve a read-only list of arguments provided to this ECall.- Returns:
-
getArgument
Get the Nth argument of this ECall. This method is safe and will return null if the index is out of bounds.- Parameters:
index
-- Returns:
-
getSpoiledExpressions
Retrieve a read-only list of expressions spoiled by this ECall.- Returns:
-
addSpoiledVariables
Use only if a dummy/failsafe prototype was set -
getStackPointerDeltaAfterExecution
int getStackPointerDeltaAfterExecution() -
setStackPointerDeltaAfterExecution
void setStackPointerDeltaAfterExecution(int delta) Use only if a dummy/failsafe prototype was set -
setReturnExpressionUnused
void setReturnExpressionUnused(boolean enabled) Set a hint (for the AST generator) indicating whether the return value of this call, if any, appears to be used by subsequent instructions in the CFG.- Parameters:
enabled
-
-
isReturnExpressionUnused
boolean isReturnExpressionUnused()Retrieve a hint (for the AST generator) indicating whether the return value of this call, if any, appears to be used by subsequent instructions in the CFG.- Returns:
-
setMemoryAccessInfo
- Parameters:
info
-
-
getMemoryAccessInfo
MemoryAccessInfo getMemoryAccessInfo()- Returns:
-
setNonReturning
Force the value of the internal non-returning flag to a custom value.- Parameters:
forcedNonReturning
- null to reset to the internal ECall's logic; else, true or false, which may allow some optimizers to perform better
-
getNonReturning
Boolean getNonReturning()Indicate whether the call is non-returning. Typically, a non-returning call is a call terminating the program, or a call performing a long branch to another area of code, without the intention of returning to what would be the 'Normal' call return-address (that is, the subsequent instruction). The value of this flag is normally computed internally, by the ECall itself. If this cannot be determined, the function returns null.- Returns:
-
setTentativeCall
void setTentativeCall(boolean enabled) -
isTentativeCall
boolean isTentativeCall() -
setHintArgumentPointsToExternalMemory
boolean setHintArgumentPointsToExternalMemory(int argIndex, boolean enabled) -
getHintArgumentPointsToExternalMemory
boolean getHintArgumentPointsToExternalMemory(int argIndex)
-