public CatchMethodItem(@Nonnull baksmaliOptions options, @Nonnull MethodDefinition.LabelCache labelCache, int codeAddress, @Nullable String exceptionType, int startAddress, int endAddress, int handlerAddress) { super(codeAddress); this.exceptionType = exceptionType; tryStartLabel = labelCache.internLabel(new LabelMethodItem(options, startAddress, "try_start_")); //use the address from the last covered instruction, but make the label //name refer to the address of the next instruction tryEndLabel = labelCache.internLabel(new EndTryLabelMethodItem(options, codeAddress, endAddress)); if (exceptionType == null) { handlerLabel = labelCache.internLabel(new LabelMethodItem(options, handlerAddress, "catchall_")); } else { handlerLabel = labelCache.internLabel(new LabelMethodItem(options, handlerAddress, "catch_")); } }
public CatchMethodItem(@Nonnull BaksmaliOptions options, @Nonnull MethodDefinition.LabelCache labelCache, int codeAddress, @Nullable String exceptionType, int startAddress, int endAddress, int handlerAddress) { super(codeAddress); this.exceptionType = exceptionType; tryStartLabel = labelCache.internLabel(new LabelMethodItem(options, startAddress, "try_start_")); //use the address from the last covered instruction, but make the label //name refer to the address of the next instruction tryEndLabel = labelCache.internLabel(new EndTryLabelMethodItem(options, codeAddress, endAddress)); if (exceptionType == null) { handlerLabel = labelCache.internLabel(new LabelMethodItem(options, handlerAddress, "catchall_")); } else { handlerLabel = labelCache.internLabel(new LabelMethodItem(options, handlerAddress, "catch_")); } }
public CatchMethodItem(@Nonnull BaksmaliOptions options, @Nonnull MethodDefinition.LabelCache labelCache, int codeAddress, @Nullable String exceptionType, int startAddress, int endAddress, int handlerAddress) { super(codeAddress); this.exceptionType = exceptionType; tryStartLabel = labelCache.internLabel(new LabelMethodItem(options, startAddress, "try_start_")); //use the address from the last covered instruction, but make the label //name refer to the address of the next instruction tryEndLabel = labelCache.internLabel(new EndTryLabelMethodItem(options, codeAddress, endAddress)); if (exceptionType == null) { handlerLabel = labelCache.internLabel(new LabelMethodItem(options, handlerAddress, "catchall_")); } else { handlerLabel = labelCache.internLabel(new LabelMethodItem(options, handlerAddress, "catch_")); } }
public OffsetInstructionFormatMethodItem(@Nonnull BaksmaliOptions options, @Nonnull MethodDefinition methodDef, int codeAddress, OffsetInstruction instruction) { super(methodDef, codeAddress, instruction); label = new LabelMethodItem(options, codeAddress + instruction.getCodeOffset(), getLabelPrefix()); label = methodDef.getLabelCache().internLabel(label); }
public OffsetInstructionFormatMethodItem(@Nonnull BaksmaliOptions options, @Nonnull MethodDefinition methodDef, int codeAddress, OffsetInstruction instruction) { super(methodDef, codeAddress, instruction); label = new LabelMethodItem(options, codeAddress + instruction.getCodeOffset(), getLabelPrefix()); label = methodDef.getLabelCache().internLabel(label); }
public OffsetInstructionFormatMethodItem(@Nonnull baksmaliOptions options, @Nonnull MethodDefinition methodDef, int codeAddress, OffsetInstruction instruction) { super(methodDef, codeAddress, instruction); label = new LabelMethodItem(options, codeAddress + instruction.getCodeOffset(), getLabelPrefix()); label = methodDef.getLabelCache().internLabel(label); }
public SparseSwitchMethodItem(MethodDefinition methodDef, int codeAddress, SparseSwitchPayload instruction) { super(methodDef, codeAddress, instruction); int baseCodeAddress = methodDef.getSparseSwitchBaseAddress(codeAddress); targets = new ArrayList<SparseSwitchTarget>(); if (baseCodeAddress >= 0) { for (SwitchElement switchElement: instruction.getSwitchElements()) { LabelMethodItem label = methodDef.getLabelCache().internLabel( new LabelMethodItem( methodDef.classDef.options, baseCodeAddress + switchElement.getOffset(), "sswitch_")); targets.add(new SparseSwitchLabelTarget(switchElement.getKey(), label)); } } else { //if we couldn't determine a base address, just use relative offsets rather than labels for (SwitchElement switchElement: instruction.getSwitchElements()) { targets.add(new SparseSwitchOffsetTarget(switchElement.getKey(), switchElement.getOffset())); } } }
public SparseSwitchMethodItem(MethodDefinition methodDef, int codeAddress, SparseSwitchPayload instruction) { super(methodDef, codeAddress, instruction); int baseCodeAddress = methodDef.getSparseSwitchBaseAddress(codeAddress); targets = new ArrayList<SparseSwitchTarget>(); if (baseCodeAddress >= 0) { for (SwitchElement switchElement: instruction.getSwitchElements()) { LabelMethodItem label = methodDef.getLabelCache().internLabel( new LabelMethodItem( methodDef.classDef.options, baseCodeAddress + switchElement.getOffset(), "sswitch_")); targets.add(new SparseSwitchLabelTarget(switchElement.getKey(), label)); } } else { commentedOut = true; //if we couldn't determine a base address, just use relative offsets rather than labels for (SwitchElement switchElement: instruction.getSwitchElements()) { targets.add(new SparseSwitchOffsetTarget(switchElement.getKey(), switchElement.getOffset())); } } }
public SparseSwitchMethodItem(MethodDefinition methodDef, int codeAddress, SparseSwitchPayload instruction) { super(methodDef, codeAddress, instruction); int baseCodeAddress = methodDef.getSparseSwitchBaseAddress(codeAddress); targets = new ArrayList<SparseSwitchTarget>(); if (baseCodeAddress >= 0) { for (SwitchElement switchElement: instruction.getSwitchElements()) { LabelMethodItem label = methodDef.getLabelCache().internLabel( new LabelMethodItem( methodDef.classDef.options, baseCodeAddress + switchElement.getOffset(), "sswitch_")); targets.add(new SparseSwitchLabelTarget(switchElement.getKey(), label)); } } else { commentedOut = true; //if we couldn't determine a base address, just use relative offsets rather than labels for (SwitchElement switchElement: instruction.getSwitchElements()) { targets.add(new SparseSwitchOffsetTarget(switchElement.getKey(), switchElement.getOffset())); } } }
public PackedSwitchMethodItem(MethodDefinition methodDef, int codeAddress, PackedSwitchPayload instruction) { super(methodDef, codeAddress, instruction); int baseCodeAddress = methodDef.getPackedSwitchBaseAddress(codeAddress); targets = new ArrayList<PackedSwitchTarget>(); boolean first = true; int firstKey = 0; if (baseCodeAddress >= 0) { for (SwitchElement switchElement: instruction.getSwitchElements()) { if (first) { firstKey = switchElement.getKey(); first = false; } LabelMethodItem label = methodDef.getLabelCache().internLabel( new LabelMethodItem(methodDef.classDef.options, baseCodeAddress + switchElement.getOffset(), "pswitch_")); targets.add(new PackedSwitchLabelTarget(label)); } } else { commentedOut = true; for (SwitchElement switchElement: instruction.getSwitchElements()) { if (first) { firstKey = switchElement.getKey(); first = false; } targets.add(new PackedSwitchOffsetTarget(switchElement.getOffset())); } } this.firstKey = firstKey; }
public PackedSwitchMethodItem(MethodDefinition methodDef, int codeAddress, PackedSwitchPayload instruction) { super(methodDef, codeAddress, instruction); int baseCodeAddress = methodDef.getPackedSwitchBaseAddress(codeAddress); targets = new ArrayList<PackedSwitchTarget>(); boolean first = true; int firstKey = 0; if (baseCodeAddress >= 0) { for (SwitchElement switchElement: instruction.getSwitchElements()) { if (first) { firstKey = switchElement.getKey(); first = false; } LabelMethodItem label = methodDef.getLabelCache().internLabel( new LabelMethodItem(methodDef.classDef.options, baseCodeAddress + switchElement.getOffset(), "pswitch_")); targets.add(new PackedSwitchLabelTarget(label)); } } else { commentedOut = true; for (SwitchElement switchElement: instruction.getSwitchElements()) { if (first) { firstKey = switchElement.getKey(); first = false; } targets.add(new PackedSwitchOffsetTarget(switchElement.getOffset())); } } this.firstKey = firstKey; }
public PackedSwitchMethodItem(MethodDefinition methodDef, int codeAddress, PackedSwitchPayload instruction) { super(methodDef, codeAddress, instruction); int baseCodeAddress = methodDef.getPackedSwitchBaseAddress(codeAddress); targets = new ArrayList<PackedSwitchTarget>(); boolean first = true; //TODO: does dalvik allow switc payloads with no cases? int firstKey = 0; if (baseCodeAddress >= 0) { for (SwitchElement switchElement: instruction.getSwitchElements()) { if (first) { firstKey = switchElement.getKey(); first = false; } LabelMethodItem label = methodDef.getLabelCache().internLabel( new LabelMethodItem(methodDef.classDef.options, baseCodeAddress + switchElement.getOffset(), "pswitch_")); targets.add(new PackedSwitchLabelTarget(label)); } } else { for (SwitchElement switchElement: instruction.getSwitchElements()) { if (first) { firstKey = switchElement.getKey(); first = false; } targets.add(new PackedSwitchOffsetTarget(switchElement.getOffset())); } } this.firstKey = firstKey; }