mirror of
https://github.com/revanced/smali.git
synced 2025-05-05 00:54:25 +02:00
Don't forget to replace un-deodexable instructions
git-svn-id: https://smali.googlecode.com/svn/trunk@671 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
parent
cf52e5cd48
commit
cbc21d5ece
@ -233,6 +233,32 @@ public class MethodAnalyzer {
|
||||
}
|
||||
} while (true);
|
||||
|
||||
|
||||
for (int i=odexedInstructions.nextSetBit(0); i>=0; i=odexedInstructions.nextSetBit(i+1)) {
|
||||
AnalyzedInstruction instruction = instructions.valueAt(i);
|
||||
|
||||
Instruction odexedInstruction = instruction.instruction;
|
||||
int objectRegisterNumber;
|
||||
|
||||
if (odexedInstruction.getFormat() == Format.Format22cs) {
|
||||
objectRegisterNumber = ((Instruction22cs)odexedInstruction).getRegisterB();
|
||||
} else if (odexedInstruction.getFormat() == Format.Format35ms) {
|
||||
objectRegisterNumber = ((Instruction35ms)odexedInstruction).getRegisterD();
|
||||
} else if (odexedInstruction.getFormat() == Format.Format3rms) {
|
||||
objectRegisterNumber = ((Instruction3rms)odexedInstruction).getStartRegister();
|
||||
} else {
|
||||
assert false;
|
||||
throw new ExceptionWithContext(String.format("Unexpected format %s for odexed instruction",
|
||||
odexedInstruction.getFormat().name()));
|
||||
}
|
||||
|
||||
instruction.setDeodexedInstruction(new UnresolvedNullReference(odexedInstruction,
|
||||
objectRegisterNumber));
|
||||
|
||||
setAndPropagateDeadness(instruction);
|
||||
}
|
||||
|
||||
|
||||
analyzerState = ANALYZED;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user