public class

DExecutionParameters

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.units.code.android.ir.DExecutionParameters

Class Overview

dexdec IR emulation parameters object. Such objects are used with a State's IDState#executeIR(DExecutionParameters) executeIR() method.

This object is used to specify a list of IR instructions, execute them or a region of that list, with restrictions.

Summary

Fields
public Integer iterationCountLeft The count of iterations left.
public Integer pc Starting IR program counter.
public Integer pcExpectedTermination Optional.
public Integer pcThresholdMax Optional.
public Integer pcThresholdMin Optional.
Public Constructors
DExecutionParameters(SortedMap<Integer, IDInstruction> insnmap)
Create an object.
DExecutionParameters(SortedMap<Integer, IDInstruction> insnmap, Map<Integer, Integer> dalvik2irmap, Map<Integer, Integer> ir2dalvikmap)
Create an object.
DExecutionParameters(CFG<IDInstruction> cfg)
Create an object, ready to emulate an entire IR routine.
DExecutionParameters(IDMethodContext ctx)
Create an object, ready to emulate an entire IR routine.
DExecutionParameters(CFG<IDInstruction> cfg, IDTryData exdata)
Create an object, ready to emulate an entire IR routine.
Public Methods
void addInitialValue(int varid, IDImm value)
CFG<IDInstruction> getCFG()
Map<Integer, Integer> getDalvikToIRMap()
IDTryData getExceptionData()
Map<Integer, Integer> getIRToDalvikMap()
Map<Integer, IDImm> getInitialValues()
Map<Integer, IDInstruction> getInstructionMap()
void prepareIterations(Integer itercnt)
Reset all parameters to null, except for the instruction map (and associated optional maps like dalvik-to-ir, ir-to-dalvik maps).
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public Integer iterationCountLeft

The count of iterations left. This counter is separate than getIterationCountLeft()! Every time an IR instruction is emulated, this counter is decreased. An exception is raised if it reaches 0. (An exception would also be raised if the IDState's counter reaches 0.)

public Integer pc

Starting IR program counter.

public Integer pcExpectedTermination

Optional. The emulation will stopped, and the last execution return result, if the PC gets to reach this value. (The IR instruction at pcExpectedTermination is not executed!)

public Integer pcThresholdMax

Optional. The emulation will stop if the PC gets greater or equal than this value.

public Integer pcThresholdMin

Optional. The emulation will stop if the PC gets less than this value.

Public Constructors

public DExecutionParameters (SortedMap<Integer, IDInstruction> insnmap)

Create an object.

Parameters
insnmap mandatory instruction map: key=IR offset, value= IR instruction

public DExecutionParameters (SortedMap<Integer, IDInstruction> insnmap, Map<Integer, Integer> dalvik2irmap, Map<Integer, Integer> ir2dalvikmap)

Create an object.

Parameters
insnmap mandatory instruction map: key=IR offset, value= IR instruction
dalvik2irmap optional map of dalvik offset mapping to a matching IR instruction offset
ir2dalvikmap optional map

public DExecutionParameters (CFG<IDInstruction> cfg)

Create an object, ready to emulate an entire IR routine.

Parameters
cfg mandatory

public DExecutionParameters (IDMethodContext ctx)

Create an object, ready to emulate an entire IR routine.

public DExecutionParameters (CFG<IDInstruction> cfg, IDTryData exdata)

Create an object, ready to emulate an entire IR routine.

Public Methods

public void addInitialValue (int varid, IDImm value)

public CFG<IDInstruction> getCFG ()

public Map<Integer, Integer> getDalvikToIRMap ()

public IDTryData getExceptionData ()

public Map<Integer, Integer> getIRToDalvikMap ()

public Map<Integer, IDImm> getInitialValues ()

public Map<Integer, IDInstruction> getInstructionMap ()

public void prepareIterations (Integer itercnt)

Reset all parameters to null, except for the instruction map (and associated optional maps like dalvik-to-ir, ir-to-dalvik maps).