Package org.eclipse.jdi.internal.jdwp

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


    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

        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

          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

        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

    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

    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

    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

   */
  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

          "event kind", EventImpl.eventKindMap(), outData); // Always 01 for Step event. //$NON-NLS-1$
      writeByte(suspendPolicyJDWP(), "suspend policy", outData); //$NON-NLS-1$
      writeInt(modifierCount(), "modifiers", outData); //$NON-NLS-1$
      writeModifiers(outData);

      JdwpReplyPacket replyPacket = requestVM(
          JdwpCommandPacket.HCR_REENTER_ON_EXIT, outBytes);
      defaultReplyErrorHandler(replyPacket.errorCode());
      DataInputStream replyData = replyPacket.dataInStream();
      fRequestID = RequestID.read(this, replyData);
      virtualMachineImpl().eventRequestManagerImpl().addRequestIDMapping(
          this);
    } catch (IOException e) {
      defaultIOExceptionHandler(e);
View Full Code Here

TOP

Related Classes of org.eclipse.jdi.internal.jdwp.JdwpReplyPacket

Copyright © 2018 www.massapicom. 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.