📄 jvmbytecodesdebug.jrag
字号:
case FASTORE: res = "fastore";break; case DASTORE: res = "dastore";break; case AASTORE: res = "aastore";break; case BASTORE: res = "bastore";break; case CASTORE: res = "castore";break; case SASTORE: res = "sastore";break; case POP: res = "pop";break; case POP2: res = "pop2";break; case DUP: res = "dup";break; case DUP_X1: res = "dup_x1";break; case DUP_X2: res = "dup_x2";break; case DUP2: res = "dup2";break; case DUP2_X1: res = "dup2_x1";break; case DUP2_X2: res = "dup2_x2" ;break; case SWAP: res = "swap";break; case IADD: res = "iadd";break; case LADD: res = "ladd";break; case FADD: res = "fadd";break; case DADD: res = "dadd";break; case ISUB: res = "isub";break; case LSUB: res = "lsub";break; case FSUB: res = "fsub";break; case DSUB: res = "dsub";break; case IMUL: res = "imul";break; case LMUL: res = "lmul";break; case FMUL: res = "fmul";break; case DMUL: res = "dmul";break; case IDIV: res = "idiv";break; case LDIV: res = "ldiv";break; case FDIV: res = "fdiv";break; case DDIV: res = "ddiv";break; case IREM: res = "irem";break; case LREM: res = "lrem";break; case FREM: res = "frem";break; case DREM: res = "drem";break; case INEG: res = "ineg";break; case LNEG: res = "lneg";break; case FNEG: res = "fneg";break; case DNEG: res = "dneg";break; case ISHL: res = "ishl";break; case LSHL: res = "lshl";break; case ISHR: res = "ishr";break; case LSHR: res = "lshr";break; case IUSHR: res = "iushr";break; case LUSHR: res = "lushr";break; case IAND: res = "iand";break; case LAND: res = "land";break; case IOR: res = "ior";break; case LOR: res = "lor";break; case IXOR: res = "ixor";break; case LXOR: res = "lxor";break; case IINC: res = "iinc";break; case I2L: res = "i2l";break; case I2F: res = "i2f";break; case I2D: res = "i2d";break; case L2I: res = "l2i";break; case L2F: res = "l2f";break; case L2D: res = "l2d";break; case F2I: res = "f2i";break; case F2L: res = "f2l";break; case F2D: res = "f2d";break; case D2I: res = "d2i";break; case D2L: res = "d2l";break; case D2F: res = "d2f";break; case I2B: res = "i2b";break; case I2C: res = "i2c";break; case I2S: res = "i2s";break; case LCMP: res = "lcmp";break; case FCMPL: res = "fcmpl";break; case FCMPG: res = "fcmpg";break; case DCMPL: res = "dcmpl";break; case DCMPG: res = "dcmpg";break; case IFEQ: res = "ifeq";break; case IFNE: res = "ifne";break; case IFLT: res = "iflt";break; case IFGE: res = "ifge";break; case IFGT: res = "ifgt";break; case IFLE: res = "ifle";break; case IF_ICMPEQ: res = "if_icmpeq";break; case IF_ICMPNE: res = "if_icmpne";break; case IF_ICMPLT: res = "if_icmplt";break; case IF_ICMPGE: res = "if_icmpge";break; case IF_ICMPGT: res = "if_icmpgt";break; case IF_ICMPLE: res = "if_icmple";break; case IF_ACMPEQ: res = "if_acmpeq";break; case IF_ACMPNE: res = "if_acmpne";break; case GOTO: res = "goto";break; case JSR: res = "jsr";break; case RET: res = "ret";break; case TABLESWITCH: res = "tableswitch";break; case LOOKUPSWITCH: res = "lookupswitch";break; case IRETURN: res = "ireturn";break; case LRETURN: res = "lreturn";break; case FRETURN: res = "freturn" ;break; case DRETURN: res = "dreturn";break; case ARETURN: res = "areturn";break; case RETURN: res = "return";break; case GETSTATIC: res = "getstatic" ;break; case PUTSTATIC: res = "putstatic";break; case GETFIELD: res = "getfield";break; case PUTFIELD: res = "putfield";break; case INVOKEVIRTUAL: res = "invokevirtual";break; case INVOKESPECIAL: res = "invokespecial";break; case INVOKESTATIC: res = "invokestatic";break; case INVOKEINTERFACE: res = "invokeinterface";break; case NEW: res = "new";break; case NEWARRAY: res = "newarray";break; case ANEWARRAY: res = "anewarray";break; case ARRAYLENGTH: res = "arraylength";break; case ATHROW: res = "athrow";break; case CHECKCAST: res = "checkcast";break; case INSTANCEOF: res = "instanceof";break; case MONITORENTER: res = "monitorenter";break; case MONITOREXIT: res = "monitorexit";break; case WIDE: res = "wide";break; case MULTIANEWARRAY: res = "multianewarray";break; case IFNULL: res = "ifnull";break; case IFNONNULL: res = "ifnonnull";break; case GOTO_W: res = "goto_w";break; case JSR_W: res = "jsr_w";break; case BREAKPOINT: res = "breakpoint";break; case IMPDEP1: res = "impdep1";break; case IMPDEP2: res = "impdep2";break; default: res = "<UNKNOWN BYTECODE:"+code+">"; } return res; } private static String getByteOperand(byte[] codes, int index) { return Integer.toString((int)codes[index]); } private static String getCharOperand(byte[] codes, int index) { int hi = ((codes[index + 0] ) << 8); int lo = ((codes[index + 1] & 0xff) << 0); return Integer.toString(hi + lo); } private static String getIntOperand(byte[] codes, int index) { int hh = ((codes[index + 0] ) << 24); int hl = ((codes[index + 1] & 0xff) << 16); int lh = ((codes[index + 2] & 0xff) << 8); int ll = ((codes[index + 3] & 0xff) << 0); return Integer.toString(hh + hl + lh + ll); } public static String getOperands(byte[] codes, int index) { String res = ""; switch(codes[index]) { case NOP: break; case ACONST_NULL:break; case ICONST_M1:break; case ICONST_0: break; case ICONST_1: break; case ICONST_2: break; case ICONST_3: break; case ICONST_4: break; case ICONST_5: break; case LCONST_0: break; case LCONST_1: break; case FCONST_0: break; case FCONST_1: break; case FCONST_2: break; case DCONST_0: break; case DCONST_1: break; case BIPUSH: res = getByteOperand(codes, index+1);break; case SIPUSH: res = getCharOperand(codes, index+1);break; case LDC: res = getByteOperand(codes, index+1);break; case LDC_W: res = getCharOperand(codes, index+1);break; case LDC2_W: res = getCharOperand(codes, index+1);break; case ILOAD: res = getByteOperand(codes, index+1);break; case LLOAD: res = getByteOperand(codes, index+1);break; case FLOAD: res = getByteOperand(codes, index+1);break; case DLOAD: res = getByteOperand(codes, index+1);break; case ALOAD: res = getByteOperand(codes, index+1);break; case ILOAD_0: break; case ILOAD_1: break; case ILOAD_2: break; case ILOAD_3: break; case LLOAD_0: break; case LLOAD_1: break; case LLOAD_2: break; case LLOAD_3: break; case FLOAD_0: break; case FLOAD_1: break; case FLOAD_2: break; case FLOAD_3: break; case DLOAD_0: break; case DLOAD_1: break; case DLOAD_2: break; case DLOAD_3: break; case ALOAD_0: break; case ALOAD_1: break; case ALOAD_2: break; case ALOAD_3: break; case IALOAD: break; case LALOAD: break; case FALOAD: break; case DALOAD: break; case AALOAD: break; case BALOAD: break; case CALOAD: break; case SALOAD: break; case ISTORE: res = getByteOperand(codes, index+1);break; case LSTORE: res = getByteOperand(codes, index+1);break; case FSTORE: res = getByteOperand(codes, index+1);break; case DSTORE: res = getByteOperand(codes, index+1);break; case ASTORE: res = getByteOperand(codes, index+1);break; case ISTORE_0: break; case ISTORE_1: break; case ISTORE_2: break; case ISTORE_3: break; case LSTORE_0: break; case LSTORE_1: break; case LSTORE_2: break; case LSTORE_3: break; case FSTORE_0: break; case FSTORE_1: break; case FSTORE_2: break; case FSTORE_3: break; case DSTORE_0: break; case DSTORE_1: break; case DSTORE_2: break; case DSTORE_3: break; case ASTORE_0: break; case ASTORE_1: break; case ASTORE_2: break; case ASTORE_3: break; case IASTORE: break; case LASTORE: break; case FASTORE: break; case DASTORE: break; case AASTORE: break; case BASTORE: break; case CASTORE: break; case SASTORE: break; case POP: break; case POP2: break; case DUP: break; case DUP_X1: break; case DUP_X2: break; case DUP2: break; case DUP2_X1: break; case DUP2_X2:break; case SWAP: break; case IADD: break; case LADD: break; case FADD: break; case DADD: break; case ISUB: break; case LSUB: break; case FSUB: break; case DSUB: break; case IMUL: break; case LMUL: break; case FMUL: break; case DMUL: break; case IDIV: break; case LDIV: break; case FDIV: break; case DDIV: break; case IREM: break; case LREM: break; case FREM: break; case DREM: break; case INEG: break; case LNEG: break; case FNEG: break; case DNEG: break; case ISHL: break; case LSHL: break; case ISHR: break; case LSHR: break; case IUSHR: break; case LUSHR: break; case IAND: break; case LAND: break; case IOR: break; case LOR: break; case IXOR: break; case LXOR: break; case IINC: res = getByteOperand(codes, index+1) + " " + getByteOperand(codes, index+2); break; case I2L: break; case I2F: break; case I2D: break; case L2I: break; case L2F: break; case L2D: break; case F2I: break; case F2L: break; case F2D: break; case D2I: break; case D2L: break; case D2F: break; case I2B: break; case I2C: break; case I2S: break; case LCMP: break; case FCMPL: break; case FCMPG: break; case DCMPL: break; case DCMPG: break; case IFEQ: res = getCharOperand(codes, index+1);break; case IFNE: res = getCharOperand(codes, index+1);break; case IFLT: res = getCharOperand(codes, index+1);break; case IFGE: res = getCharOperand(codes, index+1);break; case IFGT: res = getCharOperand(codes, index+1);break; case IFLE: res = getCharOperand(codes, index+1);break; case IF_ICMPEQ: res = getCharOperand(codes, index+1);break; case IF_ICMPNE: res = getCharOperand(codes, index+1);break; case IF_ICMPLT: res = getCharOperand(codes, index+1);break; case IF_ICMPGE: res = getCharOperand(codes, index+1);break; case IF_ICMPGT: res = getCharOperand(codes, index+1);break; case IF_ICMPLE: res = getCharOperand(codes, index+1);break; case IF_ACMPEQ: res = getCharOperand(codes, index+1);break; case IF_ACMPNE: res = getCharOperand(codes, index+1);break; case GOTO: res = getCharOperand(codes, index+1);break; case JSR: res = getCharOperand(codes, index+1);break; case RET: res = getByteOperand(codes, index+1);break; case TABLESWITCH: { int db = ((index + 4) / 4) * 4; // Align-4, step to defaultbytes int val = fourByteToInt(codes, db); db+=4; res = "defaultbytes:" + val; int low = fourByteToInt(codes, db); db+=4; res += ", low:" + low; int high = fourByteToInt(codes, db); db+=4; res += ", high:" + high; for(int i = 0; i < (high-low+1); i++) res += "\n\t" + "offset:" + fourByteToInt(codes, db + i * 4);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -