Class DExecutionParameters

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

public class DExecutionParameters extends Object
dexdec IR emulation parameters object. Such objects are used with a State's executeIR() method.

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

  • Field Details

    • pc

      public Integer pc
      Starting IR program counter.
    • pcExpectedTermination

      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!)
    • pcThresholdMin

      public Integer pcThresholdMin
      Optional. The emulation will stop if the PC gets less than this value.
    • pcThresholdMax

      public Integer pcThresholdMax
      Optional. The emulation will stop if the PC gets greater or equal than this value.
    • iterationCountLeft

      public Integer iterationCountLeft
      The count of iterations left. This counter is separate than IDState.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.)
  • Constructor Details

    • DExecutionParameters

      public DExecutionParameters(SortedMap<Integer,IDInstruction> insnmap)
      Create an object.
      Parameters:
      insnmap - mandatory instruction map: key=IR offset, value= IR instruction
    • DExecutionParameters

      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
    • DExecutionParameters

      public DExecutionParameters(CFG<IDInstruction> cfg)
      Create an object, ready to emulate an entire IR routine.
      Parameters:
      cfg - mandatory
    • DExecutionParameters

      public DExecutionParameters(IDMethodContext ctx)
      Create an object, ready to emulate an entire IR routine.
      Parameters:
      ctx -
    • DExecutionParameters

      public DExecutionParameters(CFG<IDInstruction> cfg, IDTryData exdata)
      Create an object, ready to emulate an entire IR routine.
      Parameters:
      cfg -
      exdata -
  • Method Details

    • getInstructionMap

      public Map<Integer,IDInstruction> getInstructionMap()
    • getDalvikToIRMap

      public Map<Integer,Integer> getDalvikToIRMap()
    • getIRToDalvikMap

      public Map<Integer,Integer> getIRToDalvikMap()
    • getCFG

      public CFG<IDInstruction> getCFG()
    • getExceptionData

      public IDTryData getExceptionData()
    • getInitialValues

      public Map<Integer,IDImm> getInitialValues()
    • addInitialValue

      public void addInitialValue(int varid, IDImm value)
    • prepareIterations

      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).
      Parameters:
      itercnt -