本文整理了Java中org.jf.dexlib2.iface.ExceptionHandler.getHandlerCodeAddress()
方法的一些代码示例,展示了ExceptionHandler.getHandlerCodeAddress()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ExceptionHandler.getHandlerCodeAddress()
方法的具体详情如下:
包路径:org.jf.dexlib2.iface.ExceptionHandler
类名称:ExceptionHandler
方法名:getHandlerCodeAddress
[英]Gets the code offset of the handler.
[中]获取处理程序的代码偏移量。
代码示例来源:origin: JesusFreke/smali
@Nonnull
private AnalyzedInstruction[] buildExceptionHandlerArray(@Nonnull TryBlock<? extends ExceptionHandler> tryBlock) {
List<? extends ExceptionHandler> exceptionHandlers = tryBlock.getExceptionHandlers();
AnalyzedInstruction[] handlerInstructions = new AnalyzedInstruction[exceptionHandlers.size()];
for (int i=0; i<exceptionHandlers.size(); i++) {
handlerInstructions[i] = analyzedInstructions.get(exceptionHandlers.get(i).getHandlerCodeAddress());
}
return handlerInstructions;
}
代码示例来源:origin: CalebFenton/simplify
return handler.getHandlerCodeAddress();
String handlerType = handler.getExceptionType();
if (className.equals(handlerType)) {
return handler.getHandlerCodeAddress();
代码示例来源:origin: JesusFreke/smali
int handlerAddress = handler.getHandlerCodeAddress();
if (handlerAddress >= codeSize) {
throw new ExceptionWithContext(
代码示例来源:origin: Tencent/tinker
tryBlocks.add(new BuilderTryBlock(startLabel, endLabel,
(TypeReference) convertReference(exceptionHandler.getExceptionTypeReference()),
newLabel(codeAddressToIndex, exceptionHandler.getHandlerCodeAddress())));
代码示例来源:origin: Sable/soot
labelAssigner.getLabelAtAddress(handler.getHandlerCodeAddress()));
代码示例来源:origin: JesusFreke/smali
private void analyzeMoveException(@Nonnull AnalyzedInstruction analyzedInstruction) {
int instructionAddress = getInstructionAddress(analyzedInstruction);
RegisterType exceptionType = RegisterType.UNKNOWN_TYPE;
for (TryBlock<? extends ExceptionHandler> tryBlock: methodImpl.getTryBlocks()) {
for (ExceptionHandler handler: tryBlock.getExceptionHandlers()) {
if (handler.getHandlerCodeAddress() == instructionAddress) {
String type = handler.getExceptionType();
if (type == null) {
exceptionType = RegisterType.getRegisterType(RegisterType.REFERENCE,
classPath.getClass("Ljava/lang/Throwable;"));
} else {
exceptionType = RegisterType.getRegisterType(RegisterType.REFERENCE, classPath.getClass(type))
.merge(exceptionType);
}
}
}
}
if (exceptionType.category == RegisterType.UNKNOWN) {
throw new AnalysisException("move-exception must be the first instruction in an exception handler block");
}
setDestinationRegisterTypeAndPropagateChanges(analyzedInstruction, exceptionType);
}
代码示例来源:origin: Sable/soot
DexlibAbstractInstruction instruction = instructionAtAddress(handler.getHandlerCodeAddress());
if (!(instruction instanceof MoveExceptionInstruction)) {
logger.debug("" + String.format("First instruction of trap handler unit not MoveException but %s",
代码示例来源:origin: JesusFreke/smali
TypeKey exceptionTypeKey = classSection.getExceptionType(eh);
int codeAddress = eh.getHandlerCodeAddress();
代码示例来源:origin: KB5201314/ZjDroid
@Override public int getHandlerCodeAddress() {
return exceptionHandler.getHandlerCodeAddress();
}
}
代码示例来源:origin: testwhat/SmaliEx
@Override public int getHandlerCodeAddress() {
return exceptionHandler.getHandlerCodeAddress();
}
}
代码示例来源:origin: org.smali/dexlib2
@Override public int getHandlerCodeAddress() {
return exceptionHandler.getHandlerCodeAddress();
}
}
代码示例来源:origin: org.smali/dexlib2
@Nonnull
private AnalyzedInstruction[] buildExceptionHandlerArray(@Nonnull TryBlock<? extends ExceptionHandler> tryBlock) {
List<? extends ExceptionHandler> exceptionHandlers = tryBlock.getExceptionHandlers();
AnalyzedInstruction[] handlerInstructions = new AnalyzedInstruction[exceptionHandlers.size()];
for (int i=0; i<exceptionHandlers.size(); i++) {
handlerInstructions[i] = analyzedInstructions.get(exceptionHandlers.get(i).getHandlerCodeAddress());
}
return handlerInstructions;
}
代码示例来源:origin: KB5201314/ZjDroid
@Nonnull
private AnalyzedInstruction[] buildExceptionHandlerArray(@Nonnull TryBlock<? extends ExceptionHandler> tryBlock) {
List<? extends ExceptionHandler> exceptionHandlers = tryBlock.getExceptionHandlers();
AnalyzedInstruction[] handlerInstructions = new AnalyzedInstruction[exceptionHandlers.size()];
for (int i=0; i<exceptionHandlers.size(); i++) {
handlerInstructions[i] = analyzedInstructions.get(exceptionHandlers.get(i).getHandlerCodeAddress());
}
return handlerInstructions;
}
代码示例来源:origin: testwhat/SmaliEx
@Override
public boolean equals(@Nullable Object o) {
if (o instanceof ExceptionHandler) {
ExceptionHandler other = (ExceptionHandler)o;
return Objects.equal(getExceptionType(), other.getExceptionType()) &&
(getHandlerCodeAddress() == other.getHandlerCodeAddress());
}
return false;
}
代码示例来源:origin: testwhat/SmaliEx
public static ImmutableExceptionHandler of(ExceptionHandler exceptionHandler) {
if (exceptionHandler instanceof ImmutableExceptionHandler) {
return (ImmutableExceptionHandler)exceptionHandler;
}
return new ImmutableExceptionHandler(
exceptionHandler.getExceptionType(),
exceptionHandler.getHandlerCodeAddress());
}
代码示例来源:origin: org.smali/dexlib2
public static ImmutableExceptionHandler of(ExceptionHandler exceptionHandler) {
if (exceptionHandler instanceof ImmutableExceptionHandler) {
return (ImmutableExceptionHandler)exceptionHandler;
}
return new ImmutableExceptionHandler(
exceptionHandler.getExceptionType(),
exceptionHandler.getHandlerCodeAddress());
}
代码示例来源:origin: org.smali/dexlib2
@Override
public boolean equals(@Nullable Object o) {
if (o instanceof ExceptionHandler) {
ExceptionHandler other = (ExceptionHandler)o;
return Objects.equal(getExceptionType(), other.getExceptionType()) &&
(getHandlerCodeAddress() == other.getHandlerCodeAddress());
}
return false;
}
代码示例来源:origin: KB5201314/ZjDroid
@Override
public boolean equals(@Nullable Object o) {
if (o instanceof ExceptionHandler) {
ExceptionHandler other = (ExceptionHandler)o;
return Objects.equal(getExceptionType(), other.getExceptionType()) &&
(getHandlerCodeAddress() == other.getHandlerCodeAddress());
}
return false;
}
代码示例来源:origin: KB5201314/ZjDroid
public static ImmutableExceptionHandler of(ExceptionHandler exceptionHandler) {
if (exceptionHandler instanceof ImmutableExceptionHandler) {
return (ImmutableExceptionHandler)exceptionHandler;
}
return new ImmutableExceptionHandler(
exceptionHandler.getExceptionType(),
exceptionHandler.getHandlerCodeAddress());
}
代码示例来源:origin: testwhat/SmaliEx
@Override
public int compareTo(@Nonnull ExceptionHandler o) {
int res;
String exceptionType = getExceptionType();
if (exceptionType == null) {
if (o.getExceptionType() != null) {
return 1;
}
} else {
String otherExceptionType = o.getExceptionType();
if (otherExceptionType == null) {
return -1;
}
res = exceptionType.compareTo(o.getExceptionType());
if (res != 0) return res;
}
return Ints.compare(getHandlerCodeAddress(), o.getHandlerCodeAddress());
}
内容来源于网络,如有侵权,请联系作者删除!