DebugInfoEncoder
| Modifier and Type | Class and Description |
|---|---|
| private static class | DebugInfoDecoder.
An entry in the resulting locals table |
| private static class | DebugInfoDecoder.
An entry in the resulting postions table |
| Modifier and Type | Field and Description |
|---|---|
| private int | address
current decoding state: bytecode address |
| private final int | codesize
size of code block in code units |
| private final Prototype | desc
method descriptor of method this debug info is for |
| private final byte[] | encoded
encoded debug info |
| private final DexFile | file
dex file this debug info will be stored in |
| private final boolean | isStatic
true if method is static |
| private final DebugInfoDecoder. | lastEntryForReg
indexed by register, the last local variable live in a reg |
| private int | line
current decoding state: line number |
| private final ArrayList | locals
locals decoded |
| private final ArrayList | positions
positions decoded |
| private final int | regSize
register size, in register units, of the register space used by this method |
| private final int | thisStringIdx
string index of the string "this" |
| Access | Constructor and Description |
|---|---|
| pack-priv | DebugInfoDecoder(byte[]
encoded debug info encoded, int size of code block in code units codesize, int register size, in register units, of the register space
used by this method regSize, boolean true if method is static isStatic, CstMethodRef method descriptor of method this debug info is for ref, DexFile dex file this debug info will be stored in file)Constructs an instance. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private void | |
| public List | Returns: locals list in ascending address order.Gets the decoded locals list, in ascending start-address order. |
| private int | Returns: register as noted above.Gets the register that begins the method's parameter range (including the 'this' parameter for non-static methods). |
| public List | Returns: positions list in ascending address order.Gets the decoded positions list. |
| private int | Returns: index into file's string ids table, -1 means nullReads a string index. |
| public static void | validateEncode(byte[]
encoded debug info info, DexFile non-null; file to refer to during decodingnon-null; method whose info is being decodednon-null; original code object that was encodedwhether the method is static isStatic)Validates an encoded debug info stream against data used to encode it, throwing an exception if they do not match. |
| private static void | validateEncode0(byte[] info, int codeSize, int countRegisters, boolean isStatic, CstMethodRef ref, DexFile file, PositionList pl, LocalList ll)
|
| address | back to summary |
|---|---|
| private int address current decoding state: bytecode address | |
| codesize | back to summary |
|---|---|
| private final int codesize size of code block in code units | |
| desc | back to summary |
|---|---|
| private final Prototype desc method descriptor of method this debug info is for | |
| encoded | back to summary |
|---|---|
| private final byte[] encoded encoded debug info | |
| file | back to summary |
|---|---|
| private final DexFile file dex file this debug info will be stored in | |
| isStatic | back to summary |
|---|---|
| private final boolean isStatic true if method is static | |
| lastEntryForReg | back to summary |
|---|---|
| private final DebugInfoDecoder. indexed by register, the last local variable live in a reg | |
| line | back to summary |
|---|---|
| private int line current decoding state: line number | |
| locals | back to summary |
|---|---|
| private final ArrayList<DebugInfoDecoder. locals decoded | |
| positions | back to summary |
|---|---|
| private final ArrayList<DebugInfoDecoder. positions decoded | |
| regSize | back to summary |
|---|---|
| private final int regSize register size, in register units, of the register space used by this method | |
| thisStringIdx | back to summary |
|---|---|
| private final int thisStringIdx string index of the string "this" | |
| DebugInfoDecoder | back to summary |
|---|---|
| pack-priv DebugInfoDecoder(byte[] encoded, int codesize, int regSize, boolean isStatic, CstMethodRef ref, DexFile file) Constructs an instance.
| |
| decode | back to summary |
|---|---|
| public void decode() Decodes the debug info sequence. | |
| decode0 | back to summary |
|---|---|
| private void decode0() throws IOException | |
| getLocals | back to summary |
|---|---|
| public List Gets the decoded locals list, in ascending start-address order.
Valid after calling
| |
| getParamBase | back to summary |
|---|---|
| private int getParamBase() Gets the register that begins the method's parameter range (including
the 'this' parameter for non-static methods). The range continues until
| |
| getPositionList | back to summary |
|---|---|
| public List Gets the decoded positions list.
Valid after calling
| |
| readStringIndex | back to summary |
|---|---|
| private int readStringIndex(ByteInput bs) throws IOException Reads a string index. String indicies are offset by 1, and a 0 value in the stream (-1 as returned by this method) means "null"
| |
| validateEncode | back to summary |
|---|---|
| public static void validateEncode(byte[] info, DexFile file, CstMethodRef ref, DalvCode code, boolean isStatic) Validates an encoded debug info stream against data used to encode it, throwing an exception if they do not match. Used to validate the encoder.
| |
| validateEncode0 | back to summary |
|---|---|
| private static void validateEncode0(byte[] info, int codeSize, int countRegisters, boolean isStatic, CstMethodRef ref, DexFile file, PositionList pl, LocalList ll) | |
| Modifier and Type | Field and Description |
|---|---|
| public int | address
address of event |
| public boolean | isStart
|
| public int | nameIndex
index of name in strings table |
| public int | reg
register number |
| public int | signatureIndex
index of type signature in strings table |
| public int | typeIndex
index of type in types table |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String |
| address | back to summary |
|---|---|
| public int address address of event | |
| isStart | back to summary |
|---|---|
| public boolean isStart
| |
| nameIndex | back to summary |
|---|---|
| public int nameIndex index of name in strings table | |
| reg | back to summary |
|---|---|
| public int reg register number | |
| signatureIndex | back to summary |
|---|---|
| public int signatureIndex index of type signature in strings table | |
| typeIndex | back to summary |
|---|---|
| public int typeIndex index of type in types table | |
| LocalEntry | back to summary |
|---|---|
| public LocalEntry(int address, boolean isStart, int reg, int nameIndex, int typeIndex, int signatureIndex) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
| |
| Modifier and Type | Field and Description |
|---|---|
| public int | address
bytecode address |
| public int | line
line number |
| Access | Constructor and Description |
|---|---|
| public |
| address | back to summary |
|---|---|
| public int address bytecode address | |
| line | back to summary |
|---|---|
| public int line line number | |
| PositionEntry | back to summary |
|---|---|
| public PositionEntry(int address, int line) | |