Example #1
0
  private void executeLineTable(ByteBuffer bb, DataOutputStream os)
      throws JdwpException, IOException {
    ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
    Class<?> clazz = refId.getType();

    VMMethod method = VMMethod.readId(clazz, bb);
    LineTable lt = method.getLineTable();
    lt.write(os);
  }
Example #2
0
  private void executeByteCodes(ByteBuffer bb, DataOutputStream os)
      throws JdwpException, IOException {
    if (!VMVirtualMachine.canGetBytecodes) {
      String msg = "getting bytecodes is unsupported";
      throw new NotImplementedException(msg);
    }

    ReferenceTypeId id = idMan.readReferenceTypeId(bb);
    Class<?> klass = id.getType();
    VMMethod method = VMMethod.readId(klass, bb);
    byte[] bytecode = VMVirtualMachine.getBytecodes(method);
    os.writeInt(bytecode.length);
    os.write(bytecode);
  }