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 Summary
FieldsModifier and TypeFieldDescriptionstatic final intConstant value fordbg-advance-line.static final intConstant value fordbg-advance-pc.static final intConstant value fordbg-end-local.static final intConstant value fordbg-end-sequence.static final intConstant value fordbg-first-special.static final intConstant value fordbg-line-base.static final intConstant value fordbg-line-range.static final intConstant value fordbg-restart-local.static final intConstant value fordbg-set-epilogue-begin.static final intConstant value fordbg-set-file.static final intConstant value fordbg-set-prologue-end.static final intConstant value fordbg-start-local.static final intConstant value fordbg-start-local-extended. -
Method Summary
Modifier and TypeMethodDescriptionRetrieve a map of variables defined at a given instruction point.getLineInfo(int address) Get the information for the line of code associated with a given bytecode address.int[]Get the name indexes for the parameters of the method.getVariables(int address) Get the variables associated with a bytecode address.
-
Field Details
-
DBG_END_SEQUENCE
static final int DBG_END_SEQUENCEConstant value fordbg-end-sequence.- See Also:
-
DBG_ADVANCE_PC
static final int DBG_ADVANCE_PCConstant value fordbg-advance-pc.- See Also:
-
DBG_ADVANCE_LINE
static final int DBG_ADVANCE_LINEConstant value fordbg-advance-line.- See Also:
-
DBG_START_LOCAL
static final int DBG_START_LOCALConstant value fordbg-start-local.- See Also:
-
DBG_START_LOCAL_EXTENDED
static final int DBG_START_LOCAL_EXTENDEDConstant value fordbg-start-local-extended.- See Also:
-
DBG_END_LOCAL
static final int DBG_END_LOCALConstant value fordbg-end-local.- See Also:
-
DBG_RESTART_LOCAL
static final int DBG_RESTART_LOCALConstant value fordbg-restart-local.- See Also:
-
DBG_SET_PROLOGUE_END
static final int DBG_SET_PROLOGUE_ENDConstant value fordbg-set-prologue-end.- See Also:
-
DBG_SET_EPILOGUE_BEGIN
static final int DBG_SET_EPILOGUE_BEGINConstant value fordbg-set-epilogue-begin.- See Also:
-
DBG_SET_FILE
static final int DBG_SET_FILEConstant value fordbg-set-file.- See Also:
-
DBG_FIRST_SPECIAL
static final int DBG_FIRST_SPECIALConstant value fordbg-first-special.- See Also:
-
DBG_LINE_BASE
static final int DBG_LINE_BASEConstant value fordbg-line-base.- See Also:
-
DBG_LINE_RANGE
static final int DBG_LINE_RANGEConstant value fordbg-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
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
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
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
-