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 booleanareEquivalent(CEnvironment env1, CEnvironment env2) voidThis method should be called before re-using the environment for another simulation.static CEnvironmentcopy(CEnvironment copy) intgetBaseTypeSize(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) longgetRoutineReturnValue(ICMethod calledRoutine, boolean autoGenerate) intgetTypeSize(ICType type) Get type size in bytesbooleanbooleanisParameterValueSet(ICIdentifier param) readMemory(long address, int bytesToRead) voidvoidsetAutoGeneratedRoutineReturnValue(ICMethod calledRoutine) voidsetAutoGenerateUndefinedIdentifierValue(boolean autoGenerateUndefinedIdentifierValue) voidsetDefaultPointedSize(Integer defaultPointedSize) voidsetGlobalVarValue(ICIdentifier gvar, long value) voidsetParameterValue(ICIdentifier param, long value) voidsetRoutineReturnValue(ICMethod calledRoutine, long retVal) voidsetVarAddress(ICIdentifier var, long address) toString()voidwriteMemory(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
-