com.pnfsoftware.jeb.core.units.code.android.ir.IDEmuFrame |
An emulator frame, used by dexdec
State objects. A frame of method execution holds the
PC, variable values, the raised exception exception (if any). Frames are stacked: each
sub-routine call creates another frame in the stack. A frame is part of an emulation
context
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract IDEmuFrame |
copy()
Perform a deep copy of this frame.
| ||||||||||
abstract boolean |
deleteVariable(int id)
Remove (unset) a variable.
| ||||||||||
abstract void |
deleteVariables()
Remove (unset) all variables.
| ||||||||||
abstract int |
getIterationCount()
Retrieve the current iteration count in the frame.
| ||||||||||
abstract String |
getMethodSignature()
Retrieve the method signature for this frame.
| ||||||||||
abstract Integer |
getNextPC()
Retrieve the optional next PC, if one was set.
| ||||||||||
abstract int |
getPC()
Retrieve the current PC.
| ||||||||||
abstract IDImm |
getRaisedException()
Retrieve the emulated exception raised by the emulation of this method.
| ||||||||||
abstract Map<Integer, IDImm> |
getVarMap()
Reserved for internal use.
| ||||||||||
abstract IDImm |
getVariable(int id, boolean readNullIfUnset)
Read a variable.
| ||||||||||
abstract IDImm |
getVariable(int id)
Read a variable.
| ||||||||||
abstract boolean |
hasVariable(int id)
Determine whether a variable is set (has a value).
| ||||||||||
abstract boolean |
isExecutionComplete()
Determine whether the emulation of the method is complete.
| ||||||||||
abstract void |
setExecutionComplete(boolean done)
This method is used by the emulator to specify that the emulation of the method is complete.
| ||||||||||
abstract void |
setPC(int PC)
Set the current PC.
| ||||||||||
abstract void |
setRaisedException(IDImm ex)
This method is used by the emulator to specify that the emulation of the method raised an
exception.
| ||||||||||
abstract void |
setVarMap(Map<Integer, IDImm> varmap)
Reserved for internal use.
| ||||||||||
abstract void |
setVariable(int id, IDImm val)
Write a variable.
| ||||||||||
abstract int |
updatePC()
Update the current PC with the
next PC and return it. |
Remove (unset) a variable.
id | variable id |
---|
DexDecEvaluationException |
---|
Remove (unset) all variables.
Retrieve the current iteration count in the frame.
Retrieve the method signature for this frame.
Retrieve the optional next PC, if one was set. The next PC is set when evaluating an
instruction via IDInstruction#evaluate
. The PC can be updated with the next PC with
updatePC()
.
Retrieve the current PC.
Retrieve the emulated exception raised by the emulation of this method.
Reserved for internal use.
Read a variable.
id | variable id |
---|---|
readNullIfUnset | fail-safe to avoid throwing if the variable is unset |
DexDecEvaluationException | if the variable is unset and `readNullIfUnset` is false |
---|
Read a variable. The variable must exist.
id | variable id |
---|
DexDecEvaluationException | if the variable is unset |
---|
Determine whether a variable is set (has a value).
id | variable id |
---|
DexDecEvaluationException |
---|
Determine whether the emulation of the method is complete. If an exception is raised
, the emulation is not considered complete.
This method is used by the emulator to specify that the emulation of the method is complete.
If an exception is raised
, the emulation is not considered
complete.
done | true if the method has "returned" |
---|
Set the current PC.
This method is used by the emulator to specify that the emulation of the method raised an exception.
ex | an emulated exception |
---|
Reserved for internal use.
varmap | a map of variables |
---|
Update the current PC with the next PC
and return it.