Examples of JdwpReplyPacket


Examples of org.eclipse.jdi.internal.jdwp.JdwpReplyPacket

      }

      writeInt(optionsToJdwpOptions(options),
          "options", MethodImpl.getInvokeOptions(), outData); //$NON-NLS-1$

      JdwpReplyPacket replyPacket = requestVM(
          JdwpCommandPacket.OR_INVOKE_METHOD, outBytes);
      switch (replyPacket.errorCode()) {
      case JdwpReplyPacket.TYPE_MISMATCH:
        throw new InvalidTypeException();
      case JdwpReplyPacket.INVALID_CLASS:
        throw new ClassNotLoadedException(
            JDIMessages.ObjectReferenceImpl_One_of_the_arguments_of_ObjectReference_invokeMethod___6);
      case JdwpReplyPacket.INVALID_THREAD:
        throw new IncompatibleThreadStateException();
      case JdwpReplyPacket.THREAD_NOT_SUSPENDED:
        throw new IncompatibleThreadStateException();
      case JdwpReplyPacket.INVALID_TYPESTATE:
        throw new IncompatibleThreadStateException();
      }
      defaultReplyErrorHandler(replyPacket.errorCode());
      DataInputStream replyData = replyPacket.dataInStream();
      ValueImpl value = ValueImpl.readWithTag(this, replyData);
      ObjectReferenceImpl exception = ObjectReferenceImpl
          .readObjectRefWithTag(this, replyData);
      if (exception != null)
        throw new InvocationException(exception);
View Full Code Here

Examples of org.eclipse.jdi.internal.jdwp.JdwpReplyPacket

   */
  public boolean isCollected() {
    // Note that this information should not be cached.
    initJdwpRequest();
    try {
      JdwpReplyPacket replyPacket = requestVM(
          JdwpCommandPacket.OR_IS_COLLECTED, this);
      switch (replyPacket.errorCode()) {
      case JdwpReplyPacket.INVALID_OBJECT:
        return true;
      case JdwpReplyPacket.NOT_IMPLEMENTED:
        // Workaround for problem in J2ME WTK (wireless toolkit)
        // @see Bug 12966
        try {
          referenceType();
        } catch (ObjectCollectedException e) {
          return true;
        }
        return false;
      default:
        defaultReplyErrorHandler(replyPacket.errorCode());
        break;
      }
      DataInputStream replyData = replyPacket.dataInStream();
      boolean result = readBoolean("is collected", replyData); //$NON-NLS-1$
      return result;
    } catch (IOException e) {
      defaultIOExceptionHandler(e);
      return false;
View Full Code Here

Examples of org.eclipse.jdi.internal.jdwp.JdwpReplyPacket

    if (fReferenceType != null) {
      return fReferenceType;
    }
    initJdwpRequest();
    try {
      JdwpReplyPacket replyPacket = requestVM(
          JdwpCommandPacket.OR_REFERENCE_TYPE, this);
      defaultReplyErrorHandler(replyPacket.errorCode());
      DataInputStream replyData = replyPacket.dataInStream();
      fReferenceType = ReferenceTypeImpl.readWithTypeTag(this, replyData);
      return fReferenceType;
    } catch (IOException e) {
      defaultIOExceptionHandler(e);
      return null;
View Full Code Here

Examples of org.eclipse.jdi.internal.jdwp.JdwpReplyPacket

        checkedValue.write(this, outData);
      } else {
        ValueImpl.writeNull(this, outData);
      }

      JdwpReplyPacket replyPacket = requestVM(
          JdwpCommandPacket.OR_SET_VALUES, outBytes);
      switch (replyPacket.errorCode()) {
      case JdwpReplyPacket.TYPE_MISMATCH:
        throw new InvalidTypeException();
      case JdwpReplyPacket.INVALID_CLASS:
        throw new ClassNotLoadedException(referenceType().name());
      }
      defaultReplyErrorHandler(replyPacket.errorCode());
    } catch (IOException e) {
      defaultIOExceptionHandler(e);
    } finally {
      handledJdwpRequest();
    }
View Full Code Here

Examples of org.eclipse.jdi.internal.jdwp.JdwpReplyPacket

          checkVM(var);
          writeInt(var.slot(), "slot", outData); //$NON-NLS-1$
          writeByte(var.tag(), "tag", JdwpID.tagMap(), outData); //$NON-NLS-1$
        }
      }
      JdwpReplyPacket replyPacket = requestVM(
          JdwpCommandPacket.SF_GET_VALUES, outBytes);
      defaultReplyErrorHandler(replyPacket.errorCode());

      DataInputStream replyData = replyPacket.dataInStream();
      int nrOfElements = readInt("elements", replyData); //$NON-NLS-1$
      if (nrOfElements != sizeNotThis)
        throw new InternalError(
            JDIMessages.StackFrameImpl_Retrieved_a_different_number_of_values_from_the_VM_than_requested_1);
View Full Code Here

Examples of org.eclipse.jdi.internal.jdwp.JdwpReplyPacket

        checkedValue.writeWithTag(this, outData);
      } else {
        ValueImpl.writeNullWithTag(this, outData);
      }

      JdwpReplyPacket replyPacket = requestVM(
          JdwpCommandPacket.SF_SET_VALUES, outBytes);
      switch (replyPacket.errorCode()) {
      case JdwpReplyPacket.INVALID_CLASS:
        throw new ClassNotLoadedException(var.typeName());
      }
      defaultReplyErrorHandler(replyPacket.errorCode());
    } catch (IOException e) {
      defaultIOExceptionHandler(e);
    } finally {
      handledJdwpRequest();
    }
View Full Code Here

Examples of org.eclipse.jdi.internal.jdwp.JdwpReplyPacket

    try {
      ByteArrayOutputStream outBytes = new ByteArrayOutputStream();
      DataOutputStream outData = new DataOutputStream(outBytes);
      writeWithThread(this, outData);

      JdwpReplyPacket replyPacket = requestVM(
          JdwpCommandPacket.SF_THIS_OBJECT, outBytes);
      defaultReplyErrorHandler(replyPacket.errorCode());

      DataInputStream replyData = replyPacket.dataInStream();
      ObjectReference result = ObjectReferenceImpl.readObjectRefWithTag(
          this, replyData);
      return result;
    } catch (IOException e) {
      defaultIOExceptionHandler(e);
View Full Code Here

Examples of org.eclipse.jdi.internal.jdwp.JdwpReplyPacket

    if (fName != null) {
      return fName;
    }
    initJdwpRequest();
    try {
      JdwpReplyPacket replyPacket = requestVM(JdwpCommandPacket.TGR_NAME,
          this);
      defaultReplyErrorHandler(replyPacket.errorCode());
      DataInputStream replyData = replyPacket.dataInStream();
      fName = readString("name", replyData); //$NON-NLS-1$
      return fName;
    } catch (IOException e) {
      defaultIOExceptionHandler(e);
      return null;
View Full Code Here

Examples of org.eclipse.jdi.internal.jdwp.JdwpReplyPacket

    if (fParent != fgUnsetParent) {
      return fParent;
    }
    initJdwpRequest();
    try {
      JdwpReplyPacket replyPacket = requestVM(
          JdwpCommandPacket.TGR_PARENT, this);
      defaultReplyErrorHandler(replyPacket.errorCode());
      DataInputStream replyData = replyPacket.dataInStream();
      fParent = ThreadGroupReferenceImpl.read(this, replyData);
      return fParent;
    } catch (IOException e) {
      defaultIOExceptionHandler(e);
      return null;
View Full Code Here

Examples of org.eclipse.jdi.internal.jdwp.JdwpReplyPacket

   */
  public ChildrenInfo childrenInfo() {
    // Note that this information should not be cached.
    initJdwpRequest();
    try {
      JdwpReplyPacket replyPacket = requestVM(
          JdwpCommandPacket.TGR_CHILDREN, this);
      defaultReplyErrorHandler(replyPacket.errorCode());
      DataInputStream replyData = replyPacket.dataInStream();
      ChildrenInfo result = new ChildrenInfo();
      int nrThreads = readInt("nr threads", replyData); //$NON-NLS-1$
      result.childThreads = new ArrayList<ThreadReference>(nrThreads);
      for (int i = 0; i < nrThreads; i++)
        result.childThreads.add(ThreadReferenceImpl.read(this,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.