Class DexBody

java.lang.Object
sootup.apk.frontend.main.DexBody

public class DexBody extends Object
  • Field Details

    • numRegisters

      protected int numRegisters
    • numParameterRegisters

      protected int numParameterRegisters
    • parameterNames

      protected final List<String> parameterNames
    • isStatic

      protected boolean isStatic
    • tries

      protected List<? extends org.jf.dexlib2.iface.TryBlock<? extends org.jf.dexlib2.iface.ExceptionHandler>> tries
    • deferredInstructions

      protected List<DeferableInstruction> deferredInstructions
    • method

      protected final org.jf.dexlib2.iface.Method method
    • locals

      protected Set<Local> locals
    • parameterTypes

      protected final List<Type> parameterTypes
    • takenLocalNames

      protected Set<String> takenLocalNames
    • registerLocals

      protected Local[] registerLocals
    • storeResultLocal

      protected Local storeResultLocal
    • dexEntry

      protected final org.jf.dexlib2.iface.MultiDexContainer.DexEntry dexEntry
    • instructionAtAddress

      protected Map<Integer,DexLibAbstractInstruction> instructionAtAddress
    • instructions

      protected List<DexLibAbstractInstruction> instructions
    • dangling

      protected DanglingInstruction dangling
    • classType

      protected ClassType classType
    • traps

      protected List<Trap> traps
  • Constructor Details

    • DexBody

      public DexBody(org.jf.dexlib2.iface.Method method, org.jf.dexlib2.iface.MultiDexContainer.DexEntry dexEntry, ClassType classType)
  • Method Details

    • getBranchingMap

      public com.google.common.collect.LinkedListMultimap<BranchingStmt,List<Stmt>> getBranchingMap()
    • addDeferredJimplification

      public void addDeferredJimplification(DeferableInstruction i)
    • instructionAtAddress

      public DexLibAbstractInstruction instructionAtAddress(int address)
    • getStoreResultLocal

      public Local getStoreResultLocal()
    • add

      public void add(Stmt stmt)
    • addBranchingStmt

      public void addBranchingStmt(BranchingStmt branchingStmt, List<Stmt> stmt)
    • insertAfter

      public void insertAfter(Stmt tobeInserted, Stmt afterThisStmt)
    • replaceStmt

      public void replaceStmt(Stmt toBeReplaced, Stmt newStmt)
    • extractDexInstructions

      protected void extractDexInstructions(org.jf.dexlib2.iface.MethodImplementation code)
    • instructionsBefore

      public List<DexLibAbstractInstruction> instructionsBefore(DexLibAbstractInstruction instruction)
    • getRegisterLocal

      public Local getRegisterLocal(int num)
      Return the Local that are associated with the number in the current register state.

      Handles if the register number actually points to a method parameter.

      Parameters:
      num - the register number
      Returns:
      the register local present in the given register number
      Throws:
      RuntimeException - if there are no registers to access
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • makeSootMethod

      public JavaSootMethod makeSootMethod(org.jf.dexlib2.iface.Method method, ClassType classType, List<BodyInterceptor> bodyInterceptors, View view)
    • convertMultimap

      public Map<BranchingStmt,List<Stmt>> convertMultimap(com.google.common.collect.LinkedListMultimap<BranchingStmt,List<Stmt>> multimap)
    • jimplify

      public void jimplify()
    • insertBefore

      public void insertBefore(Stmt tobeInserted, Stmt beforeThisStmt)
    • setDanglingInstruction

      public void setDanglingInstruction(DanglingInstruction i)
    • freshLocalName

      protected String freshLocalName(String hint)