public interface

IECall

implements IEStatement
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IECall

Class Overview

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.

Summary

[Expand]
Inherited Constants
From interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEStatement
Public Methods
abstract void addSpoiledVariables(List<IEVar> spoiledVariables)
Use only if a dummy/failsafe prototype was set
abstract IEGeneric getArgument(int index)
Get the Nth argument of this ECall.
abstract List<IEGeneric> getArguments()
Retrieve a read-only list of arguments provided to this ECall.
abstract IEGeneric getCallSite()
abstract int getCountOfArguments()
Retrieve the number of arguments.
abstract int getCountOfReturns()
Retrieve the number of return values.
abstract List<IEVar> getDynamicTargetCandidates()
abstract boolean getHintArgumentPointsToExternalMemory(int argIndex)
abstract MemoryAccessInfo getMemoryAccessInfo()
abstract Boolean getNonReturning()
Indicate whether the call is non-returning.
abstract List<IEGeneric> getParameterExpressions()
This method is deprecated. Use getArguments() instead.
abstract IWildcardPrototype getPrototype()
abstract IEGeneric getReturnExpression(int index)
Get the Nth return expression of this ECall.
abstract List<IEGeneric> getReturnExpressions()
Retrieve a read-only list of return expressions.
abstract IEGeneric getReturnLocation()
Retrieve the return address for this call.
abstract List<IEGeneric> getSpoiledExpressions()
Retrieve a read-only list of expressions spoiled by this ECall.
abstract int getStackPointerDeltaAfterExecution()
abstract INativeMethodItem getStaticCallsite()
abstract boolean isFailsafePrototype()
abstract 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.
abstract boolean isStaticCallsite()
abstract boolean isTentativeCall()
abstract void setCallsite(IEGeneric callsite)
abstract void setFailsafePrototype(boolean enabled)
abstract boolean setHintArgumentPointsToExternalMemory(int argIndex, boolean enabled)
abstract void setMemoryAccessInfo(MemoryAccessInfo info)
abstract void setNonReturning(Boolean forcedNonReturning)
Force the value of the internal non-returning flag to a custom value.
abstract void setPrototype(IWildcardPrototype prototype, boolean failsafe)
Dangerous method, will be removed from API.
abstract void setReturnExpression(int index, IEGeneric exp)
Update a return expression.
abstract 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.
abstract void setReturnLocation(IEGeneric loc)
Set the optional return location (address) for the call.
abstract void setStackPointerDeltaAfterExecution(int delta)
Use only if a dummy/failsafe prototype was set
abstract void setTentativeCall(boolean enabled)
[Expand]
Inherited Methods
From interface com.pnfsoftware.jeb.core.units.code.IInstruction
From interface com.pnfsoftware.jeb.core.units.code.IInstructionOperand
From interface com.pnfsoftware.jeb.core.units.code.IResizableInstruction
From interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEGeneric
From interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEStatement

Public Methods

public abstract void addSpoiledVariables (List<IEVar> spoiledVariables)

Use only if a dummy/failsafe prototype was set

public abstract IEGeneric getArgument (int index)

Get the Nth argument of this ECall. This method is safe and will return null if the index is out of bounds.

public abstract List<IEGeneric> getArguments ()

Retrieve a read-only list of arguments provided to this ECall.

public abstract IEGeneric getCallSite ()

public abstract int getCountOfArguments ()

Retrieve the number of arguments.

public abstract int getCountOfReturns ()

Retrieve the number of return values.

public abstract List<IEVar> getDynamicTargetCandidates ()

public abstract boolean getHintArgumentPointsToExternalMemory (int argIndex)

public abstract MemoryAccessInfo getMemoryAccessInfo ()

public abstract 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.

public abstract List<IEGeneric> getParameterExpressions ()

This method is deprecated.
Use getArguments() instead.

public abstract IWildcardPrototype getPrototype ()

public abstract IEGeneric getReturnExpression (int index)

Get the Nth return expression of this ECall. This method is safe and will return null if the index is out of bounds.

public abstract List<IEGeneric> getReturnExpressions ()

Retrieve a read-only list of return expressions. In most cases, the list will return 0 or 1 arguments.

public abstract 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

public abstract List<IEGeneric> getSpoiledExpressions ()

Retrieve a read-only list of expressions spoiled by this ECall.

public abstract int getStackPointerDeltaAfterExecution ()

public abstract INativeMethodItem getStaticCallsite ()

public abstract boolean isFailsafePrototype ()

public abstract 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.

public abstract boolean isStaticCallsite ()

public abstract boolean isTentativeCall ()

public abstract void setCallsite (IEGeneric callsite)

public abstract void setFailsafePrototype (boolean enabled)

public abstract boolean setHintArgumentPointsToExternalMemory (int argIndex, boolean enabled)

public abstract void setMemoryAccessInfo (MemoryAccessInfo info)

public abstract void setNonReturning (Boolean forcedNonReturning)

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

public abstract void setPrototype (IWildcardPrototype prototype, boolean failsafe)

Dangerous method, will be removed from API. The prototype compatibility with the current call attributes (returns, params, etc.) is not verified.

public abstract void setReturnExpression (int index, IEGeneric exp)

Update a return expression.

Parameters
index the index must be valid, i.e. be in the [0, count_returns) range else the method will throw
exp non-null IRE

public abstract 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.

public abstract void setReturnLocation (IEGeneric loc)

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

public abstract void setStackPointerDeltaAfterExecution (int delta)

Use only if a dummy/failsafe prototype was set

public abstract void setTentativeCall (boolean enabled)