Java Code Examples for org.jf.dexlib2.DebugItemType#LINE_NUMBER
The following examples show how to use
org.jf.dexlib2.DebugItemType#LINE_NUMBER .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ImmutableDebugItem.java From ZjDroid with Apache License 2.0 | 6 votes |
@Nonnull public static ImmutableDebugItem of(DebugItem debugItem) { if (debugItem instanceof ImmutableDebugItem) { return (ImmutableDebugItem)debugItem; } switch (debugItem.getDebugItemType()) { case DebugItemType.START_LOCAL: return ImmutableStartLocal.of((StartLocal)debugItem); case DebugItemType.END_LOCAL: return ImmutableEndLocal.of((EndLocal)debugItem); case DebugItemType.RESTART_LOCAL: return ImmutableRestartLocal.of((RestartLocal)debugItem); case DebugItemType.PROLOGUE_END: return ImmutablePrologueEnd.of((PrologueEnd)debugItem); case DebugItemType.EPILOGUE_BEGIN: return ImmutableEpilogueBegin.of((EpilogueBegin)debugItem); case DebugItemType.SET_SOURCE_FILE: return ImmutableSetSourceFile.of((SetSourceFile)debugItem); case DebugItemType.LINE_NUMBER: return ImmutableLineNumber.of((LineNumber)debugItem); default: throw new ExceptionWithContext("Invalid debug item type: %d", debugItem.getDebugItemType()); } }
Example 2
Source File: DebugMethodItem.java From ZjDroid with Apache License 2.0 | 6 votes |
public static DebugMethodItem build(RegisterFormatter registerFormatter, DebugItem debugItem) { int codeAddress = debugItem.getCodeAddress(); switch (debugItem.getDebugItemType()) { case DebugItemType.START_LOCAL: return new StartLocalMethodItem(codeAddress, -1, registerFormatter, (StartLocal)debugItem); case DebugItemType.END_LOCAL: return new EndLocalMethodItem(codeAddress, -1, registerFormatter, (EndLocal)debugItem); case DebugItemType.RESTART_LOCAL: return new RestartLocalMethodItem(codeAddress, -1, registerFormatter, (RestartLocal)debugItem); case DebugItemType.EPILOGUE_BEGIN: return new BeginEpilogueMethodItem(codeAddress, -4); case DebugItemType.PROLOGUE_END: return new EndPrologueMethodItem(codeAddress, -4); case DebugItemType.SET_SOURCE_FILE: return new SetSourceFileMethodItem(codeAddress, -3, (SetSourceFile)debugItem); case DebugItemType.LINE_NUMBER: return new LineNumberMethodItem(codeAddress, -2, (LineNumber)debugItem); default: throw new ExceptionWithContext("Invalid debug item type: %d", debugItem.getDebugItemType()); } }
Example 3
Source File: DebugMethodItem.java From atlas with Apache License 2.0 | 6 votes |
public static DebugMethodItem build(RegisterFormatter registerFormatter, DebugItem debugItem) { int codeAddress = debugItem.getCodeAddress(); switch (debugItem.getDebugItemType()) { case DebugItemType.START_LOCAL: return new StartLocalMethodItem(codeAddress, -1, registerFormatter, (StartLocal)debugItem); case DebugItemType.END_LOCAL: return new EndLocalMethodItem(codeAddress, -1, registerFormatter, (EndLocal)debugItem); case DebugItemType.RESTART_LOCAL: return new RestartLocalMethodItem(codeAddress, -1, registerFormatter, (RestartLocal)debugItem); case DebugItemType.EPILOGUE_BEGIN: return new BeginEpilogueMethodItem(codeAddress, -4); case DebugItemType.PROLOGUE_END: return new EndPrologueMethodItem(codeAddress, -4); case DebugItemType.SET_SOURCE_FILE: return new SetSourceFileMethodItem(codeAddress, -3, (SetSourceFile)debugItem); case DebugItemType.LINE_NUMBER: return new LineNumberMethodItem(codeAddress, -2, (LineNumber)debugItem); default: throw new ExceptionWithContext("Invalid debug item type: %d", debugItem.getDebugItemType()); } }
Example 4
Source File: ImmutableDebugItem.java From zjdroid with Apache License 2.0 | 6 votes |
@Nonnull public static ImmutableDebugItem of(DebugItem debugItem) { if (debugItem instanceof ImmutableDebugItem) { return (ImmutableDebugItem)debugItem; } switch (debugItem.getDebugItemType()) { case DebugItemType.START_LOCAL: return ImmutableStartLocal.of((StartLocal)debugItem); case DebugItemType.END_LOCAL: return ImmutableEndLocal.of((EndLocal)debugItem); case DebugItemType.RESTART_LOCAL: return ImmutableRestartLocal.of((RestartLocal)debugItem); case DebugItemType.PROLOGUE_END: return ImmutablePrologueEnd.of((PrologueEnd)debugItem); case DebugItemType.EPILOGUE_BEGIN: return ImmutableEpilogueBegin.of((EpilogueBegin)debugItem); case DebugItemType.SET_SOURCE_FILE: return ImmutableSetSourceFile.of((SetSourceFile)debugItem); case DebugItemType.LINE_NUMBER: return ImmutableLineNumber.of((LineNumber)debugItem); default: throw new ExceptionWithContext("Invalid debug item type: %d", debugItem.getDebugItemType()); } }
Example 5
Source File: DebugMethodItem.java From HeyGirl with Apache License 2.0 | 6 votes |
public static DebugMethodItem build(RegisterFormatter registerFormatter, DebugItem debugItem) { int codeAddress = debugItem.getCodeAddress(); switch (debugItem.getDebugItemType()) { case DebugItemType.START_LOCAL: return new StartLocalMethodItem(codeAddress, -1, registerFormatter, (StartLocal)debugItem); case DebugItemType.END_LOCAL: return new EndLocalMethodItem(codeAddress, -1, registerFormatter, (EndLocal)debugItem); case DebugItemType.RESTART_LOCAL: return new RestartLocalMethodItem(codeAddress, -1, registerFormatter, (RestartLocal)debugItem); case DebugItemType.EPILOGUE_BEGIN: return new BeginEpilogueMethodItem(codeAddress, -4); case DebugItemType.PROLOGUE_END: return new EndPrologueMethodItem(codeAddress, -4); case DebugItemType.SET_SOURCE_FILE: return new SetSourceFileMethodItem(codeAddress, -3, (SetSourceFile)debugItem); case DebugItemType.LINE_NUMBER: return new LineNumberMethodItem(codeAddress, -2, (LineNumber)debugItem); default: throw new ExceptionWithContext("Invalid debug item type: %d", debugItem.getDebugItemType()); } }
Example 6
Source File: DebugMethodItem.java From zjdroid with Apache License 2.0 | 6 votes |
public static DebugMethodItem build(RegisterFormatter registerFormatter, DebugItem debugItem) { int codeAddress = debugItem.getCodeAddress(); switch (debugItem.getDebugItemType()) { case DebugItemType.START_LOCAL: return new StartLocalMethodItem(codeAddress, -1, registerFormatter, (StartLocal)debugItem); case DebugItemType.END_LOCAL: return new EndLocalMethodItem(codeAddress, -1, registerFormatter, (EndLocal)debugItem); case DebugItemType.RESTART_LOCAL: return new RestartLocalMethodItem(codeAddress, -1, registerFormatter, (RestartLocal)debugItem); case DebugItemType.EPILOGUE_BEGIN: return new BeginEpilogueMethodItem(codeAddress, -4); case DebugItemType.PROLOGUE_END: return new EndPrologueMethodItem(codeAddress, -4); case DebugItemType.SET_SOURCE_FILE: return new SetSourceFileMethodItem(codeAddress, -3, (SetSourceFile)debugItem); case DebugItemType.LINE_NUMBER: return new LineNumberMethodItem(codeAddress, -2, (LineNumber)debugItem); default: throw new ExceptionWithContext("Invalid debug item type: %d", debugItem.getDebugItemType()); } }
Example 7
Source File: ImmutableDebugItem.java From HeyGirl with Apache License 2.0 | 6 votes |
@Nonnull public static ImmutableDebugItem of(DebugItem debugItem) { if (debugItem instanceof ImmutableDebugItem) { return (ImmutableDebugItem)debugItem; } switch (debugItem.getDebugItemType()) { case DebugItemType.START_LOCAL: return ImmutableStartLocal.of((StartLocal)debugItem); case DebugItemType.END_LOCAL: return ImmutableEndLocal.of((EndLocal)debugItem); case DebugItemType.RESTART_LOCAL: return ImmutableRestartLocal.of((RestartLocal)debugItem); case DebugItemType.PROLOGUE_END: return ImmutablePrologueEnd.of((PrologueEnd)debugItem); case DebugItemType.EPILOGUE_BEGIN: return ImmutableEpilogueBegin.of((EpilogueBegin)debugItem); case DebugItemType.SET_SOURCE_FILE: return ImmutableSetSourceFile.of((SetSourceFile)debugItem); case DebugItemType.LINE_NUMBER: return ImmutableLineNumber.of((LineNumber)debugItem); default: throw new ExceptionWithContext("Invalid debug item type: %d", debugItem.getDebugItemType()); } }
Example 8
Source File: MutableMethodImplementation.java From ZjDroid with Apache License 2.0 | 5 votes |
@Nonnull private BuilderDebugItem convertDebugItem(@Nonnull DebugItem debugItem) { switch (debugItem.getDebugItemType()) { case DebugItemType.START_LOCAL: { StartLocal startLocal = (StartLocal)debugItem; return new BuilderStartLocal(startLocal.getRegister(), startLocal.getNameReference(), startLocal.getTypeReference(), startLocal.getSignatureReference()); } case DebugItemType.END_LOCAL: { EndLocal endLocal = (EndLocal)debugItem; return new BuilderEndLocal(endLocal.getRegister()); } case DebugItemType.RESTART_LOCAL: { RestartLocal restartLocal = (RestartLocal)debugItem; return new BuilderRestartLocal(restartLocal.getRegister()); } case DebugItemType.PROLOGUE_END: return new BuilderPrologueEnd(); case DebugItemType.EPILOGUE_BEGIN: return new BuilderEpilogueBegin(); case DebugItemType.LINE_NUMBER: { LineNumber lineNumber = (LineNumber)debugItem; return new BuilderLineNumber(lineNumber.getLineNumber()); } case DebugItemType.SET_SOURCE_FILE: { SetSourceFile setSourceFile = (SetSourceFile)debugItem; return new BuilderSetSourceFile(setSourceFile.getSourceFileReference()); } default: throw new ExceptionWithContext("Invalid debug item type: " + debugItem.getDebugItemType()); } }
Example 9
Source File: MutableMethodImplementation.java From HeyGirl with Apache License 2.0 | 5 votes |
@Nonnull private BuilderDebugItem convertDebugItem(@Nonnull DebugItem debugItem) { switch (debugItem.getDebugItemType()) { case DebugItemType.START_LOCAL: { StartLocal startLocal = (StartLocal)debugItem; return new BuilderStartLocal(startLocal.getRegister(), startLocal.getNameReference(), startLocal.getTypeReference(), startLocal.getSignatureReference()); } case DebugItemType.END_LOCAL: { EndLocal endLocal = (EndLocal)debugItem; return new BuilderEndLocal(endLocal.getRegister()); } case DebugItemType.RESTART_LOCAL: { RestartLocal restartLocal = (RestartLocal)debugItem; return new BuilderRestartLocal(restartLocal.getRegister()); } case DebugItemType.PROLOGUE_END: return new BuilderPrologueEnd(); case DebugItemType.EPILOGUE_BEGIN: return new BuilderEpilogueBegin(); case DebugItemType.LINE_NUMBER: { LineNumber lineNumber = (LineNumber)debugItem; return new BuilderLineNumber(lineNumber.getLineNumber()); } case DebugItemType.SET_SOURCE_FILE: { SetSourceFile setSourceFile = (SetSourceFile)debugItem; return new BuilderSetSourceFile(setSourceFile.getSourceFileReference()); } default: throw new ExceptionWithContext("Invalid debug item type: " + debugItem.getDebugItemType()); } }
Example 10
Source File: ClassPool.java From ZjDroid with Apache License 2.0 | 4 votes |
@Override public void writeDebugItem(@Nonnull DebugWriter<CharSequence, CharSequence> writer, DebugItem debugItem) throws IOException { switch (debugItem.getDebugItemType()) { case DebugItemType.START_LOCAL: { StartLocal startLocal = (StartLocal)debugItem; writer.writeStartLocal(startLocal.getCodeAddress(), startLocal.getRegister(), startLocal.getName(), startLocal.getType(), startLocal.getSignature()); break; } case DebugItemType.END_LOCAL: { EndLocal endLocal = (EndLocal)debugItem; writer.writeEndLocal(endLocal.getCodeAddress(), endLocal.getRegister()); break; } case DebugItemType.RESTART_LOCAL: { RestartLocal restartLocal = (RestartLocal)debugItem; writer.writeRestartLocal(restartLocal.getCodeAddress(), restartLocal.getRegister()); break; } case DebugItemType.PROLOGUE_END: { writer.writePrologueEnd(debugItem.getCodeAddress()); break; } case DebugItemType.EPILOGUE_BEGIN: { writer.writeEpilogueBegin(debugItem.getCodeAddress()); break; } case DebugItemType.LINE_NUMBER: { LineNumber lineNumber = (LineNumber)debugItem; writer.writeLineNumber(lineNumber.getCodeAddress(), lineNumber.getLineNumber()); break; } case DebugItemType.SET_SOURCE_FILE: { SetSourceFile setSourceFile = (SetSourceFile)debugItem; writer.writeSetSourceFile(setSourceFile.getCodeAddress(), setSourceFile.getSourceFile()); } default: throw new ExceptionWithContext("Unexpected debug item type: %d", debugItem.getDebugItemType()); } }
Example 11
Source File: BuilderClassPool.java From ZjDroid with Apache License 2.0 | 4 votes |
@Override public void writeDebugItem(@Nonnull DebugWriter<BuilderStringReference, BuilderTypeReference> writer, DebugItem debugItem) throws IOException { switch (debugItem.getDebugItemType()) { case DebugItemType.START_LOCAL: { StartLocal startLocal = (StartLocal)debugItem; writer.writeStartLocal(startLocal.getCodeAddress(), startLocal.getRegister(), checkStringReference(startLocal.getNameReference()), checkTypeReference(startLocal.getTypeReference()), checkStringReference(startLocal.getSignatureReference())); break; } case DebugItemType.END_LOCAL: { EndLocal endLocal = (EndLocal)debugItem; writer.writeEndLocal(endLocal.getCodeAddress(), endLocal.getRegister()); break; } case DebugItemType.RESTART_LOCAL: { RestartLocal restartLocal = (RestartLocal)debugItem; writer.writeRestartLocal(restartLocal.getCodeAddress(), restartLocal.getRegister()); break; } case DebugItemType.PROLOGUE_END: { writer.writePrologueEnd(debugItem.getCodeAddress()); break; } case DebugItemType.EPILOGUE_BEGIN: { writer.writeEpilogueBegin(debugItem.getCodeAddress()); break; } case DebugItemType.LINE_NUMBER: { LineNumber lineNumber = (LineNumber)debugItem; writer.writeLineNumber(lineNumber.getCodeAddress(), lineNumber.getLineNumber()); break; } case DebugItemType.SET_SOURCE_FILE: { SetSourceFile setSourceFile = (SetSourceFile)debugItem; writer.writeSetSourceFile(setSourceFile.getCodeAddress(), checkStringReference(setSourceFile.getSourceFileReference())); } default: throw new ExceptionWithContext("Unexpected debug item type: %d", debugItem.getDebugItemType()); } }
Example 12
Source File: BuilderClassPool.java From HeyGirl with Apache License 2.0 | 4 votes |
@Override public void writeDebugItem(@Nonnull DebugWriter<BuilderStringReference, BuilderTypeReference> writer, DebugItem debugItem) throws IOException { switch (debugItem.getDebugItemType()) { case DebugItemType.START_LOCAL: { StartLocal startLocal = (StartLocal)debugItem; writer.writeStartLocal(startLocal.getCodeAddress(), startLocal.getRegister(), checkStringReference(startLocal.getNameReference()), checkTypeReference(startLocal.getTypeReference()), checkStringReference(startLocal.getSignatureReference())); break; } case DebugItemType.END_LOCAL: { EndLocal endLocal = (EndLocal)debugItem; writer.writeEndLocal(endLocal.getCodeAddress(), endLocal.getRegister()); break; } case DebugItemType.RESTART_LOCAL: { RestartLocal restartLocal = (RestartLocal)debugItem; writer.writeRestartLocal(restartLocal.getCodeAddress(), restartLocal.getRegister()); break; } case DebugItemType.PROLOGUE_END: { writer.writePrologueEnd(debugItem.getCodeAddress()); break; } case DebugItemType.EPILOGUE_BEGIN: { writer.writeEpilogueBegin(debugItem.getCodeAddress()); break; } case DebugItemType.LINE_NUMBER: { LineNumber lineNumber = (LineNumber)debugItem; writer.writeLineNumber(lineNumber.getCodeAddress(), lineNumber.getLineNumber()); break; } case DebugItemType.SET_SOURCE_FILE: { SetSourceFile setSourceFile = (SetSourceFile)debugItem; writer.writeSetSourceFile(setSourceFile.getCodeAddress(), checkStringReference(setSourceFile.getSourceFileReference())); } default: throw new ExceptionWithContext("Unexpected debug item type: %d", debugItem.getDebugItemType()); } }
Example 13
Source File: ClassPool.java From HeyGirl with Apache License 2.0 | 4 votes |
@Override public void writeDebugItem(@Nonnull DebugWriter<CharSequence, CharSequence> writer, DebugItem debugItem) throws IOException { switch (debugItem.getDebugItemType()) { case DebugItemType.START_LOCAL: { StartLocal startLocal = (StartLocal)debugItem; writer.writeStartLocal(startLocal.getCodeAddress(), startLocal.getRegister(), startLocal.getName(), startLocal.getType(), startLocal.getSignature()); break; } case DebugItemType.END_LOCAL: { EndLocal endLocal = (EndLocal)debugItem; writer.writeEndLocal(endLocal.getCodeAddress(), endLocal.getRegister()); break; } case DebugItemType.RESTART_LOCAL: { RestartLocal restartLocal = (RestartLocal)debugItem; writer.writeRestartLocal(restartLocal.getCodeAddress(), restartLocal.getRegister()); break; } case DebugItemType.PROLOGUE_END: { writer.writePrologueEnd(debugItem.getCodeAddress()); break; } case DebugItemType.EPILOGUE_BEGIN: { writer.writeEpilogueBegin(debugItem.getCodeAddress()); break; } case DebugItemType.LINE_NUMBER: { LineNumber lineNumber = (LineNumber)debugItem; writer.writeLineNumber(lineNumber.getCodeAddress(), lineNumber.getLineNumber()); break; } case DebugItemType.SET_SOURCE_FILE: { SetSourceFile setSourceFile = (SetSourceFile)debugItem; writer.writeSetSourceFile(setSourceFile.getCodeAddress(), setSourceFile.getSourceFile()); } default: throw new ExceptionWithContext("Unexpected debug item type: %d", debugItem.getDebugItemType()); } }
Example 14
Source File: ClassPool.java From zjdroid with Apache License 2.0 | 4 votes |
@Override public void writeDebugItem(@Nonnull DebugWriter<CharSequence, CharSequence> writer, DebugItem debugItem) throws IOException { switch (debugItem.getDebugItemType()) { case DebugItemType.START_LOCAL: { StartLocal startLocal = (StartLocal)debugItem; writer.writeStartLocal(startLocal.getCodeAddress(), startLocal.getRegister(), startLocal.getName(), startLocal.getType(), startLocal.getSignature()); break; } case DebugItemType.END_LOCAL: { EndLocal endLocal = (EndLocal)debugItem; writer.writeEndLocal(endLocal.getCodeAddress(), endLocal.getRegister()); break; } case DebugItemType.RESTART_LOCAL: { RestartLocal restartLocal = (RestartLocal)debugItem; writer.writeRestartLocal(restartLocal.getCodeAddress(), restartLocal.getRegister()); break; } case DebugItemType.PROLOGUE_END: { writer.writePrologueEnd(debugItem.getCodeAddress()); break; } case DebugItemType.EPILOGUE_BEGIN: { writer.writeEpilogueBegin(debugItem.getCodeAddress()); break; } case DebugItemType.LINE_NUMBER: { LineNumber lineNumber = (LineNumber)debugItem; writer.writeLineNumber(lineNumber.getCodeAddress(), lineNumber.getLineNumber()); break; } case DebugItemType.SET_SOURCE_FILE: { SetSourceFile setSourceFile = (SetSourceFile)debugItem; writer.writeSetSourceFile(setSourceFile.getCodeAddress(), setSourceFile.getSourceFile()); } default: throw new ExceptionWithContext("Unexpected debug item type: %d", debugItem.getDebugItemType()); } }
Example 15
Source File: BuilderClassPool.java From zjdroid with Apache License 2.0 | 4 votes |
@Override public void writeDebugItem(@Nonnull DebugWriter<BuilderStringReference, BuilderTypeReference> writer, DebugItem debugItem) throws IOException { switch (debugItem.getDebugItemType()) { case DebugItemType.START_LOCAL: { StartLocal startLocal = (StartLocal)debugItem; writer.writeStartLocal(startLocal.getCodeAddress(), startLocal.getRegister(), checkStringReference(startLocal.getNameReference()), checkTypeReference(startLocal.getTypeReference()), checkStringReference(startLocal.getSignatureReference())); break; } case DebugItemType.END_LOCAL: { EndLocal endLocal = (EndLocal)debugItem; writer.writeEndLocal(endLocal.getCodeAddress(), endLocal.getRegister()); break; } case DebugItemType.RESTART_LOCAL: { RestartLocal restartLocal = (RestartLocal)debugItem; writer.writeRestartLocal(restartLocal.getCodeAddress(), restartLocal.getRegister()); break; } case DebugItemType.PROLOGUE_END: { writer.writePrologueEnd(debugItem.getCodeAddress()); break; } case DebugItemType.EPILOGUE_BEGIN: { writer.writeEpilogueBegin(debugItem.getCodeAddress()); break; } case DebugItemType.LINE_NUMBER: { LineNumber lineNumber = (LineNumber)debugItem; writer.writeLineNumber(lineNumber.getCodeAddress(), lineNumber.getLineNumber()); break; } case DebugItemType.SET_SOURCE_FILE: { SetSourceFile setSourceFile = (SetSourceFile)debugItem; writer.writeSetSourceFile(setSourceFile.getCodeAddress(), checkStringReference(setSourceFile.getSourceFileReference())); } default: throw new ExceptionWithContext("Unexpected debug item type: %d", debugItem.getDebugItemType()); } }
Example 16
Source File: BuilderLineNumber.java From HeyGirl with Apache License 2.0 | votes |
@Override public int getDebugItemType() { return DebugItemType.LINE_NUMBER; }
Example 17
Source File: ImmutableLineNumber.java From HeyGirl with Apache License 2.0 | votes |
@Override public int getDebugItemType() { return DebugItemType.LINE_NUMBER; }
Example 18
Source File: ImmutableLineNumber.java From zjdroid with Apache License 2.0 | votes |
@Override public int getDebugItemType() { return DebugItemType.LINE_NUMBER; }
Example 19
Source File: BuilderLineNumber.java From ZjDroid with Apache License 2.0 | votes |
@Override public int getDebugItemType() { return DebugItemType.LINE_NUMBER; }
Example 20
Source File: ImmutableLineNumber.java From ZjDroid with Apache License 2.0 | votes |
@Override public int getDebugItemType() { return DebugItemType.LINE_NUMBER; }