public void writePrologueEnd(int codeAddress) throws IOException { writeAdvancePC(codeAddress); writer.write(DebugItemType.PROLOGUE_END); }
public void writeEpilogueBegin(int codeAddress) throws IOException { writeAdvancePC(codeAddress); writer.write(DebugItemType.EPILOGUE_BEGIN); }
public void writePrologueEnd(int codeAddress) throws IOException { writeAdvancePC(codeAddress); writer.write(DebugItemType.PROLOGUE_END); }
public void writeEpilogueBegin(int codeAddress) throws IOException { writeAdvancePC(codeAddress); writer.write(DebugItemType.EPILOGUE_BEGIN); }
public void writeEpilogueBegin(int codeAddress) throws IOException { writeAdvancePC(codeAddress); writer.write(DebugItemType.EPILOGUE_BEGIN); }
public void writePrologueEnd(int codeAddress) throws IOException { writeAdvancePC(codeAddress); writer.write(DebugItemType.PROLOGUE_END); }
public void writeEndLocal(int codeAddress, int register) throws IOException { writeAdvancePC(codeAddress); writer.write(DebugItemType.END_LOCAL); writer.writeUleb128(register); }
public void writeRestartLocal(int codeAddress, int register) throws IOException { writeAdvancePC(codeAddress); writer.write(DebugItemType.RESTART_LOCAL); writer.writeUleb128(register); }
public void writeEndLocal(int codeAddress, int register) throws IOException { writeAdvancePC(codeAddress); writer.write(DebugItemType.END_LOCAL); writer.writeUleb128(register); }
public void writeRestartLocal(int codeAddress, int register) throws IOException { writeAdvancePC(codeAddress); writer.write(DebugItemType.RESTART_LOCAL); writer.writeUleb128(register); }
public void writeEndLocal(int codeAddress, int register) throws IOException { writeAdvancePC(codeAddress); writer.write(DebugItemType.END_LOCAL); writer.writeUleb128(register); }
public void writeRestartLocal(int codeAddress, int register) throws IOException { writeAdvancePC(codeAddress); writer.write(DebugItemType.RESTART_LOCAL); writer.writeUleb128(register); }
public void writeSetSourceFile(int codeAddress, @Nullable StringKey sourceFile) throws IOException { writeAdvancePC(codeAddress); writer.write(DebugItemType.SET_SOURCE_FILE); writer.writeUleb128(stringSection.getNullableItemIndex(sourceFile) + 1); }
public void writeSetSourceFile(int codeAddress, @Nullable StringKey sourceFile) throws IOException { writeAdvancePC(codeAddress); writer.write(DebugItemType.SET_SOURCE_FILE); writer.writeUleb128(stringSection.getNullableItemIndex(sourceFile) + 1); }
public void writeSetSourceFile(int codeAddress, @Nullable StringKey sourceFile) throws IOException { writeAdvancePC(codeAddress); writer.write(DebugItemType.SET_SOURCE_FILE); writer.writeUleb128(stringSection.getNullableItemIndex(sourceFile) + 1); }
public void writeLineNumber(int codeAddress, int lineNumber) throws IOException { int lineDelta = lineNumber - currentLine; int addressDelta = codeAddress - currentAddress; if (addressDelta < 0) { throw new ExceptionWithContext("debug info items must have non-decreasing code addresses"); } if (lineDelta < -4 || lineDelta > 10) { writeAdvanceLine(lineNumber); lineDelta = 0; } // no else is intentional here. we might need to advance the PC as well as the line if ((lineDelta < 2 && addressDelta > 16) || (lineDelta > 1 && addressDelta > 15)) { writeAdvancePC(codeAddress); addressDelta = 0; } // we need to emit the special opcode even if both lineDelta and addressDelta are 0, otherwise a positions // entry isn't generated writeSpecialOpcode(lineDelta, addressDelta); }
public void writeLineNumber(int codeAddress, int lineNumber) throws IOException { int lineDelta = lineNumber - currentLine; int addressDelta = codeAddress - currentAddress; if (addressDelta < 0) { throw new ExceptionWithContext("debug info items must have non-decreasing code addresses"); } if (lineDelta < -4 || lineDelta > 10) { writeAdvanceLine(lineNumber); lineDelta = 0; } // no else is intentional here. we might need to advance the PC as well as the line if ((lineDelta < 2 && addressDelta > 16) || (lineDelta > 1 && addressDelta > 15)) { writeAdvancePC(codeAddress); addressDelta = 0; } // we need to emit the special opcode even if both lineDelta and addressDelta are 0, otherwise a positions // entry isn't generated writeSpecialOpcode(lineDelta, addressDelta); }
public void writeLineNumber(int codeAddress, int lineNumber) throws IOException { int lineDelta = lineNumber - currentLine; int addressDelta = codeAddress - currentAddress; if (addressDelta < 0) { throw new ExceptionWithContext("debug info items must have non-decreasing code addresses"); } if (lineDelta < -4 || lineDelta > 10) { writeAdvanceLine(lineNumber); lineDelta = 0; } // no else is intentional here. we might need to advance the PC as well as the line if ((lineDelta < 2 && addressDelta > 16) || (lineDelta > 1 && addressDelta > 15)) { writeAdvancePC(codeAddress); addressDelta = 0; } // we need to emit the special opcode even if both lineDelta and addressDelta are 0, otherwise a positions // entry isn't generated writeSpecialOpcode(lineDelta, addressDelta); }
public void writeStartLocal(int codeAddress, int register, @Nullable StringKey name, @Nullable TypeKey type, @Nullable StringKey signature) throws IOException { int nameIndex = stringSection.getNullableItemIndex(name); int typeIndex = typeSection.getNullableItemIndex(type); int signatureIndex = stringSection.getNullableItemIndex(signature); writeAdvancePC(codeAddress); if (signatureIndex == DexWriter.NO_INDEX) { writer.write(DebugItemType.START_LOCAL); writer.writeUleb128(register); writer.writeUleb128(nameIndex + 1); writer.writeUleb128(typeIndex + 1); } else { writer.write(DebugItemType.START_LOCAL_EXTENDED); writer.writeUleb128(register); writer.writeUleb128(nameIndex + 1); writer.writeUleb128(typeIndex + 1); writer.writeUleb128(signatureIndex + 1); } }
public void writeStartLocal(int codeAddress, int register, @Nullable StringKey name, @Nullable TypeKey type, @Nullable StringKey signature) throws IOException { int nameIndex = stringSection.getNullableItemIndex(name); int typeIndex = typeSection.getNullableItemIndex(type); int signatureIndex = stringSection.getNullableItemIndex(signature); writeAdvancePC(codeAddress); if (signatureIndex == DexWriter.NO_INDEX) { writer.write(DebugItemType.START_LOCAL); writer.writeUleb128(register); writer.writeUleb128(nameIndex + 1); writer.writeUleb128(typeIndex + 1); } else { writer.write(DebugItemType.START_LOCAL_EXTENDED); writer.writeUleb128(register); writer.writeUleb128(nameIndex + 1); writer.writeUleb128(typeIndex + 1); writer.writeUleb128(signatureIndex + 1); } }