Interface IDexDebugInfo


public interface IDexDebugInfo
This interface represents Dex debug information for a method. Debug information can be forged and should not be trusted.

This interface offers a medium-level and high-level view of debug information available for a given method:
- medium-level: use getVariables(int) and getLineInfo(int)
- high-level (most clients will want to use that): use getKnownVariablesMap(IDexMethod)

  • Field Details

    • DBG_END_SEQUENCE

      static final int DBG_END_SEQUENCE
      Constant value for dbg-end-sequence.
      See Also:
    • DBG_ADVANCE_PC

      static final int DBG_ADVANCE_PC
      Constant value for dbg-advance-pc.
      See Also:
    • DBG_ADVANCE_LINE

      static final int DBG_ADVANCE_LINE
      Constant value for dbg-advance-line.
      See Also:
    • DBG_START_LOCAL

      static final int DBG_START_LOCAL
      Constant value for dbg-start-local.
      See Also:
    • DBG_START_LOCAL_EXTENDED

      static final int DBG_START_LOCAL_EXTENDED
      Constant value for dbg-start-local-extended.
      See Also:
    • DBG_END_LOCAL

      static final int DBG_END_LOCAL
      Constant value for dbg-end-local.
      See Also:
    • DBG_RESTART_LOCAL

      static final int DBG_RESTART_LOCAL
      Constant value for dbg-restart-local.
      See Also:
    • DBG_SET_PROLOGUE_END

      static final int DBG_SET_PROLOGUE_END
      Constant value for dbg-set-prologue-end.
      See Also:
    • DBG_SET_EPILOGUE_BEGIN

      static final int DBG_SET_EPILOGUE_BEGIN
      Constant value for dbg-set-epilogue-begin.
      See Also:
    • DBG_SET_FILE

      static final int DBG_SET_FILE
      Constant value for dbg-set-file.
      See Also:
    • DBG_FIRST_SPECIAL

      static final int DBG_FIRST_SPECIAL
      Constant value for dbg-first-special.
      See Also:
    • DBG_LINE_BASE

      static final int DBG_LINE_BASE
      Constant value for dbg-line-base.
      See Also:
    • DBG_LINE_RANGE

      static final int DBG_LINE_RANGE
      Constant value for dbg-line-range.
      See Also:
  • Method Details

    • getParameterNameIndexes

      int[] getParameterNameIndexes()
      Get the name indexes for the parameters of the method.
      Returns:
      the list of name indexes, or null if none
    • getLineInfo

      IDexDebugLine getLineInfo(int address)
      Get the information for the line of code associated with a given bytecode address.
      Parameters:
      address - offset in method in 16-bit code units
      Returns:
      the line information object, null if none
    • getVariables

      List<IDexDebugVariable> getVariables(int address)
      Get the variables associated with a bytecode address.
      Parameters:
      address - offset in method in 16-bit code units
      Returns:
      a list of variables, possibly empty
    • getKnownVariablesMap

      SortedMap<Integer,List<IDexDebugVariable>> getKnownVariablesMap(IDexMethod m)
      Retrieve a map of variables defined at a given instruction point.
      Parameters:
      m - the method that owns this debug information
      Returns:
      on error, an empty map; else a map of: key= method offset (in bytes); value= list of all debug variables existing (having a definition) at that instruction