Package org.eclipse.jdi.internal.jdwp

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


   *         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

   * 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

    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

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

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.