Examples of JdwpReplyPacket


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

    try {
      ByteArrayOutputStream outBytes = new ByteArrayOutputStream();
      DataOutputStream outData = new DataOutputStream(outBytes);
      writeString(value, "string value", outData); //$NON-NLS-1$

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

      DataInputStream replyData = replyPacket.dataInStream();
      StringReference result = StringReferenceImpl.read(this, replyData);
      return result;
    } catch (IOException e) {
      defaultIOExceptionHandler(e);
      return null;
View Full Code Here

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

   */
  public void resume() {
    initJdwpRequest();
    try {
      resetThreadEventFlags();
      JdwpReplyPacket replyPacket = requestVM(JdwpCommandPacket.VM_RESUME);
      defaultReplyErrorHandler(replyPacket.errorCode());
    } finally {
      handledJdwpRequest();
    }
  }
View Full Code Here

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

   * @see com.sun.jdi.VirtualMachine#suspend()
   */
  public void suspend() {
    initJdwpRequest();
    try {
      JdwpReplyPacket replyPacket = requestVM(JdwpCommandPacket.VM_SUSPEND);
      defaultReplyErrorHandler(replyPacket.errorCode());
    } finally {
      handledJdwpRequest();
    }
  }
View Full Code Here

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

   */
  public List<ThreadGroupReference> topLevelThreadGroups() {
    // Note that this information should not be cached.
    initJdwpRequest();
    try {
      JdwpReplyPacket replyPacket = requestVM(JdwpCommandPacket.VM_TOP_LEVEL_THREAD_GROUPS);
      defaultReplyErrorHandler(replyPacket.errorCode());

      DataInputStream replyData = replyPacket.dataInStream();
      int nrGroups = readInt("nr of groups", replyData); //$NON-NLS-1$
      ArrayList<ThreadGroupReference> result = new ArrayList<ThreadGroupReference>(nrGroups);
      for (int i = 0; i < nrGroups; i++) {
        ThreadGroupReferenceImpl threadGroup = ThreadGroupReferenceImpl.read(this, replyData);
        result.add(threadGroup);
View Full Code Here

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

    // the initiating command.
    MirrorImpl mirror = new VoidValueImpl(this);

    mirror.initJdwpRequest();
    try {
      JdwpReplyPacket replyPacket = mirror
          .requestVM(JdwpCommandPacket.VM_ID_SIZES);
      mirror.defaultReplyErrorHandler(replyPacket.errorCode());
      DataInputStream replyData = replyPacket.dataInStream();

      fFieldIDSize = mirror.readInt("field ID size", replyData); //$NON-NLS-1$
      fMethodIDSize = mirror.readInt("method ID size", replyData); //$NON-NLS-1$
      fObjectIDSize = mirror.readInt("object ID size", replyData); //$NON-NLS-1$
      fReferenceTypeIDSize = mirror.readInt("refType ID size", replyData); //$NON-NLS-1$
View Full Code Here

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

    if (fVersionDescription != null)
      return;

    initJdwpRequest();
    try {
      JdwpReplyPacket replyPacket = requestVM(JdwpCommandPacket.VM_VERSION);
      defaultReplyErrorHandler(replyPacket.errorCode());
      DataInputStream replyData = replyPacket.dataInStream();

      fVersionDescription = readString("version descr.", replyData); //$NON-NLS-1$
      fJdwpMajorVersion = readInt("major version", replyData); //$NON-NLS-1$
      fJdwpMinorVersion = readInt("minor version", replyData); //$NON-NLS-1$
      fVMVersion = readString("version", replyData); //$NON-NLS-1$
View Full Code Here

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

    fHcrCapabilities = new boolean[HCR_CAN_REENTER_ON_EXIT + 1];

    if (isHCRSupported()) {
      initJdwpRequest();
      try {
        JdwpReplyPacket replyPacket = requestVM(JdwpCommandPacket.HCR_CAPABILITIES);
        defaultReplyErrorHandler(replyPacket.errorCode());
        DataInputStream replyData = replyPacket.dataInStream();

        fHcrCapabilities[HCR_CAN_RELOAD_CLASSES] = readBoolean(
            "reload classes", replyData); //$NON-NLS-1$
        fHcrCapabilities[HCR_CAN_GET_CLASS_VERSION] = readBoolean(
            "get class version", replyData); //$NON-NLS-1$
View Full Code Here

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

      for (int i = 0; i < names.length; i++) {
        signatures[i] = TypeImpl.classNameToSignature(names[i]);
        writeString(signatures[i], "signature", outData); //$NON-NLS-1$
      }

      JdwpReplyPacket replyPacket = requestVM(
          JdwpCommandPacket.HCR_CLASSES_HAVE_CHANGED, outBytes);
      defaultReplyErrorHandler(replyPacket.errorCode());
      DataInputStream replyData = replyPacket.dataInStream();

      byte resultFlag = readByte("result", resultHCRMap(), replyData); //$NON-NLS-1$
      switch (resultFlag) {
      case HCR_RELOAD_SUCCESS:
        return RELOAD_SUCCESS;
View Full Code Here

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

                                // cache of
                                // redefined
                                // types
      }

      JdwpReplyPacket reply = requestVM(
          JdwpCommandPacket.VM_REDEFINE_CLASSES, outBytes);
      switch (reply.errorCode()) {
      case JdwpReplyPacket.UNSUPPORTED_VERSION:
        throw new UnsupportedClassVersionError();
      case JdwpReplyPacket.INVALID_CLASS_FORMAT:
        throw new ClassFormatError();
      case JdwpReplyPacket.CIRCULAR_CLASS_DEFINITION:
        throw new ClassCircularityError();
      case JdwpReplyPacket.FAILS_VERIFICATION:
        throw new VerifyError();
      case JdwpReplyPacket.NAMES_DONT_MATCH:
        throw new NoClassDefFoundError();
      case JdwpReplyPacket.ADD_METHOD_NOT_IMPLEMENTED:
        throw new UnsupportedOperationException(
            JDIMessages.VirtualMachineImpl_Add_method_not_implemented_1);
      case JdwpReplyPacket.SCHEMA_CHANGE_NOT_IMPLEMENTED:
        throw new UnsupportedOperationException(
            JDIMessages.VirtualMachineImpl_Scheme_change_not_implemented_2);
      case JdwpReplyPacket.HIERARCHY_CHANGE_NOT_IMPLEMENTED:
        throw new UnsupportedOperationException(
            JDIMessages.VirtualMachineImpl_Hierarchy_change_not_implemented_3);
      case JdwpReplyPacket.DELETE_METHOD_NOT_IMPLEMENTED:
        throw new UnsupportedOperationException(
            JDIMessages.VirtualMachineImpl_Delete_method_not_implemented_4);
      case JdwpReplyPacket.CLASS_MODIFIERS_CHANGE_NOT_IMPLEMENTED:
        throw new UnsupportedOperationException(
            JDIMessages.VirtualMachineImpl_Class_modifiers_change_not_implemented_5);
      case JdwpReplyPacket.METHOD_MODIFIERS_CHANGE_NOT_IMPLEMENTED:
        throw new UnsupportedOperationException(
            JDIMessages.VirtualMachineImpl_Method_modifiers_change_not_implemented_6);
      default:
        defaultReplyErrorHandler(reply.errorCode());
      }
    } catch (IOException ioe) {
      defaultIOExceptionHandler(ioe);
      return;
    } finally {
View Full Code Here

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

    try {
      ByteArrayOutputStream outBytes = new ByteArrayOutputStream();
      DataOutputStream outData = new DataOutputStream(outBytes);
      writeString(stratum, "stratum ID", outData); //$NON-NLS-1$

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

    } catch (IOException e) {
      defaultIOExceptionHandler(e);
    } finally {
      handledJdwpRequest();
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.