@Override public void visitStartLocal(int reg, DexLabel label, String name, String type, String signature) { super.visitStartLocal(reg, label, name, type, signature); if (signature == null) { out.s(".local %s, %s:%s", reg(reg), BaksmaliDumper.escapeValue(name), type); } else { out.s(".local %s, %s:%s, %s", reg(reg), BaksmaliDumper.escapeValue(name), type, BaksmaliDumper.escapeValue(signature)); } }
@Override public void visitMethodStmt(Op op, int[] args, String name, Proto proto, MethodHandle bsm, Object... bsmArgs) { StringBuilder sb = new StringBuilder(); sb.append("{ ").append( BaksmaliDumper.escapeValue(bsm)).append(", ").append(BaksmaliDumper.escapeValue(name)).append(", ").append(BaksmaliDumper.escapeMethodDesc(proto)); for(Object o: bsmArgs) { sb.append(", ").append(BaksmaliDumper.escapeValue(o)); } sb.append("}"); if (args.length > 0) { if (op.format == InstructionFormat.kFmt3rc) { // invoke-x/range out.s("%s { %s .. %s }, %s", op.displayName, reg(args[0]), reg(args[args.length - 1]), sb); } else { boolean first = true; StringBuilder buff = new StringBuilder(); for (int i : args) { if (first) { first = false; } else { buff.append(", "); } buff.append(reg(i)); } out.s("%s { %s }, %s", op.displayName, buff, sb); } } else { out.s("%s { }, %s", op.displayName, sb); } }
@SuppressWarnings("incomplete-switch") @Override public void visitConstStmt(Op op, int ra, Object value) { switch (op) { case CONST_WIDE_16: { Long v = (Long) value; value = (int) v.shortValue(); break; } case CONST_WIDE_HIGH16: { Long v = (Long) value; value = (int) ((short) (v >> 48)); break; } case CONST_WIDE_32: { Long v = (Long) value; value = (int) v.intValue(); break; } case CONST_HIGH16: { Integer v = (Integer) value; value = (int) v.intValue() >> 16; break; } } out.s("%s %s, %s", op.displayName, reg(ra), BaksmaliDumper.escapeValue(value)); super.visitConstStmt(op, ra, value); }
byte[] vs = (byte[]) array; for (int i = 0; i < vs.length; i++) { out.s(BaksmaliDumper.escapeValue(vs[i])); for (int i = 0; i < vs.length; i++) { short a = vs[i]; out.s("%s %s", BaksmaliDumper.escapeValue((byte) (a & 0xFF)), BaksmaliDumper.escapeValue((byte) (0xFF & (a >> 8)))); for (int i = 0; i < vs.length; i++) { int a = vs[i]; out.s("%s %s %s %s", BaksmaliDumper.escapeValue((byte) (a & 0xFF)), BaksmaliDumper.escapeValue((byte) (0xFF & (a >> 8))), BaksmaliDumper.escapeValue((byte) (0xFF & (a >> 16))), BaksmaliDumper.escapeValue((byte) (0xFF & (a >> 24)))); for (int i = 0; i < vs.length; i++) { int a = Float.floatToIntBits(vs[i]); out.s("%s %s %s %s", BaksmaliDumper.escapeValue((byte) (a & 0xFF)), BaksmaliDumper.escapeValue((byte) (0xFF & (a >> 8))), BaksmaliDumper.escapeValue((byte) (0xFF & (a >> 16))), BaksmaliDumper.escapeValue((byte) (0xFF & (a >> 24)))); int a = (int) ttt; int b = (int) (ttt >>> 32); out.s("%s %s %s %s %s %s %s %s", BaksmaliDumper.escapeValue((byte) (a & 0xFF)), BaksmaliDumper.escapeValue((byte) (0xFF & (a >> 8))), BaksmaliDumper.escapeValue((byte) (0xFF & (a >> 16))), BaksmaliDumper.escapeValue((byte) (0xFF & (a >> 24))),
out.s(".source " + escapeValue(n.source)); if (f.cst != null) { buff.append(" = "); buff.append(escapeValue(f.cst));
sb.append(escapeId(name)).append(" = "); sb.append(escapeValue(o)); if (array) { sb.append(",");