Class CEnvironment
java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.simulator.CEnvironment
Simulation environment. Serves as a proxy to access outside method world. In particular it
provides:
- concrete values for parameters, routine calls, global variables
- access to the underlying native unit
clearState()
).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
areEquivalent
(CEnvironment env1, CEnvironment env2) void
This method should be called before re-using the environment for another simulation.static CEnvironment
copy
(CEnvironment copy) int
getBaseTypeSize
(ICType type) Get base type size in bytes, i.e.Gets the default size for memory reads through pointers, in bytes.getGlobalVarValue
(ICIdentifier gvar, boolean readInMemory) getParameterValue
(ICIdentifier param) getParameterValue
(ICIdentifier param, boolean autoGenerate) long
getRoutineReturnValue
(ICMethod calledRoutine, boolean autoGenerate) int
getTypeSize
(ICType type) Get type size in bytesboolean
boolean
isParameterValueSet
(ICIdentifier param) readMemory
(long address, int bytesToRead) void
void
setAutoGeneratedRoutineReturnValue
(ICMethod calledRoutine) void
setAutoGenerateUndefinedIdentifierValue
(boolean autoGenerateUndefinedIdentifierValue) void
setDefaultPointedSize
(Integer defaultPointedSize) void
setGlobalVarValue
(ICIdentifier gvar, long value) void
setParameterValue
(ICIdentifier param, long value) void
setRoutineReturnValue
(ICMethod calledRoutine, long retVal) void
setVarAddress
(ICIdentifier var, long address) toString()
void
writeMemory
(long address, long value)
-
Constructor Details
-
CEnvironment
-
-
Method Details
-
copy
-
getBaseTypeSize
Get base type size in bytes, i.e. the size of TYPE in 'TYPE *' -
getTypeSize
Get type size in bytes -
setParameterValue
-
setAutoGeneratedParameterValue
-
isParameterValueSet
-
getParameterValue
-
getParameterValue
-
setRoutineReturnValue
-
setAutoGeneratedRoutineReturnValue
-
getRoutineReturnValue
-
getRoutineDefaultReturnValue
-
setGlobalVarValue
-
getGlobalVarValue
-
writeMemory
public void writeMemory(long address, long value) -
readMemory
-
setVarAddress
-
getVarAddress
-
getDefaultPointedSize
Gets the default size for memory reads through pointers, in bytes. -
setDefaultPointedSize
-
isAutoGenerateUndefinedIdentifierValue
public boolean isAutoGenerateUndefinedIdentifierValue() -
setAutoGenerateUndefinedIdentifierValue
public void setAutoGenerateUndefinedIdentifierValue(boolean autoGenerateUndefinedIdentifierValue) -
getPassedParameterValue
-
areEquivalent
-
clearState
public void clearState()This method should be called before re-using the environment for another simulation. -
toString
-