Examples of JdwpCommandPacket


Examples of gnu.classpath.jdwp.transport.JdwpCommandPacket

        return;
      }
   
    if (pkt != null)
      {
        JdwpCommandPacket commandPkt = (JdwpCommandPacket) pkt;
        JdwpReplyPacket reply = new JdwpReplyPacket(commandPkt);
       
        // Reset our output stream
        _outputBytes.reset();
       
        // Create a ByteBuffer around the command packet
        ByteBuffer bb = ByteBuffer.wrap(commandPkt.getData());
        byte command = commandPkt.getCommand();
        byte commandSet = commandPkt.getCommandSet();
       
        CommandSet set = null;
        try
          {
            // There is no command set with value 0
            if (commandSet > 0 && commandSet < _sets.length)
              {
                set = _sets[commandPkt.getCommandSet()];
              }
            if (set != null)
              {
                _shutdown = set.runCommand(bb, _os, command);
                reply.setData(_outputBytes.toByteArray());
View Full Code Here

Examples of gnu.classpath.jdwp.transport.JdwpCommandPacket

  dos.writeInt (1);
  dos.writeByte (_eventKind);
  dos.writeInt (request.getId ());
  _writeData (dos);

  pkt = new JdwpCommandPacket (JdwpConstants.CommandSet.Event.CS_VALUE,
             JdwpConstants.CommandSet.Event.COMPOSITE);
      }
    catch (IOException ioe)
      {
  pkt = null;
View Full Code Here

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

  /**
   * @return Returns a specified Command Packet from the Virtual Machine.
   */
  public JdwpCommandPacket getCommand(int command, long timeToWait)
      throws InterruptedException {
    JdwpCommandPacket packet = null;
    synchronized (fCommandPackets) {
      long remainingTime = timeToWait;
      long timeBeforeWait;
      long waitedTime;

View Full Code Here

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

   *         packet list.
   */
  private JdwpCommandPacket removeCommandPacket(int command) {
    ListIterator<JdwpCommandPacket> iter = fCommandPackets.listIterator();
    while (iter.hasNext()) {
      JdwpCommandPacket packet = iter.next();
      if (packet.getCommand() == command) {
        iter.remove();
        return packet;
      }
    }
    return null;
View Full Code Here

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

   * Performs a VM request.
   *
   * @return Returns reply data.
   */
  public JdwpReplyPacket requestVM(int command, byte[] outData) {
    JdwpCommandPacket commandPacket = new JdwpCommandPacket(command);
    commandPacket.setData(outData);
    long sent = System.currentTimeMillis();
    fVirtualMachineImpl.packetSendManager().sendPacket(commandPacket);
    fPendingJdwpRequest = true;
    writeVerboseCommandPacketHeader(commandPacket);

    JdwpReplyPacket reply = fVirtualMachineImpl.packetReceiveManager()
        .getReply(commandPacket);
    long recieved = System.currentTimeMillis();
    if (JDIDebugOptions.DEBUG_JDI_REQUEST_TIMES) {
      StringBuffer buf = new StringBuffer();
      buf.append(JDIDebugOptions.FORMAT.format(new Date(sent)));
      buf.append(" JDI Request: "); //$NON-NLS-1$
      buf.append(commandPacket.toString());
      buf.append("\n\tResponse Time: "); //$NON-NLS-1$
      buf.append(recieved - sent);
      buf.append("ms"); //$NON-NLS-1$
      buf.append(" length: "); //$NON-NLS-1$
      buf.append(reply.getLength());
View Full Code Here

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

    try {
      // We remove elements from event sets that are generated from
      // inside, therefore the set may become empty.
      EventSetImpl set;
      do {
        JdwpCommandPacket packet = getCommandVM(
            JdwpCommandPacket.E_COMPOSITE, timeout);
        initJdwpEventSet(packet);
        set = EventSetImpl.read(this, packet.dataInStream());
        handledJdwpEventSet();
      } while (set.isEmpty());
      return set;
    } catch (TimeoutException e) {
      // Timeout in getCommand, JDI spec says return null.
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.