當前位置: 首頁>>代碼示例>>Java>>正文


Java ReplyPacket.getNextValueAsLocation方法代碼示例

本文整理匯總了Java中org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket.getNextValueAsLocation方法的典型用法代碼示例。如果您正苦於以下問題:Java ReplyPacket.getNextValueAsLocation方法的具體用法?Java ReplyPacket.getNextValueAsLocation怎麽用?Java ReplyPacket.getNextValueAsLocation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket的用法示例。


在下文中一共展示了ReplyPacket.getNextValueAsLocation方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: updateEventContext

import org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket; //導入方法依賴的package包/類
private void updateEventContext(EventThread event) {
  final long threadId = event.getThreadID();
  final List<JUnit3Wrapper.DebuggeeState.DebuggeeFrame> frames = new ArrayList<>();
  debuggeeState = new DebuggeeState(getMirror(), threadId, frames);

  // ART returns an error if we ask for frames when there is none. Workaround by asking the
  // frame count first.
  int frameCount = getMirror().getFrameCount(threadId);
  if (frameCount > 0) {
    ReplyPacket replyPacket = getMirror().getThreadFrames(threadId, 0, frameCount);
    int number = replyPacket.getNextValueAsInt();
    assertEquals(frameCount, number);

    for (int i = 0; i < frameCount; ++i) {
      long frameId = replyPacket.getNextValueAsFrameID();
      Location location = replyPacket.getNextValueAsLocation();
      frames.add(debuggeeState.new DebuggeeFrame(frameId, location));
    }
    assertAllDataRead(replyPacket);
  }
}
 
開發者ID:inferjay,項目名稱:r8,代碼行數:22,代碼來源:DebugTestBase.java

示例2: jdwpGetFrames

import org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket; //導入方法依賴的package包/類
protected FrameInfo[] jdwpGetFrames(long threadID, int startFrame, int length) {
    CommandPacket packet = new CommandPacket(
            JDWPCommands.ThreadReferenceCommandSet.CommandSetID,
            JDWPCommands.ThreadReferenceCommandSet.FramesCommand);
    packet.setNextValueAsThreadID(threadID);
    packet.setNextValueAsInt(startFrame);
    packet.setNextValueAsInt(length);
    
    ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet);
    checkReplyPacket(reply, "ThreadReference::FramesCommand command");
           
    int frames = reply.getNextValueAsInt();
    FrameInfo[] frameInfos = new FrameInfo[frames];
    for (int i = 0; i < frames; i++) {
        long frameID = reply.getNextValueAsLong();
        Location location = reply.getNextValueAsLocation();
        frameInfos[i] = new FrameInfo(frameID, location);
    }
    return frameInfos;
}
 
開發者ID:shannah,項目名稱:cn1,代碼行數:21,代碼來源:JDWPStackFrameTestCase.java

示例3: jdwpGetFrames

import org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket; //導入方法依賴的package包/類
protected FrameInfo[] jdwpGetFrames(long threadID, int startFrame, int length) {
    CommandPacket packet = new CommandPacket(
            JDWPCommands.ThreadReferenceCommandSet.CommandSetID,
            JDWPCommands.ThreadReferenceCommandSet.FramesCommand);
    packet.setNextValueAsThreadID(threadID);
    packet.setNextValueAsInt(startFrame);
    packet.setNextValueAsInt(length);
    
    ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet);
    if (!checkReplyPacketWithoutFail(reply, "ThreadReference::FramesCommand command")) {
        throw new TestErrorException("Error during performing ThreadReference::Frames command");
    }
           
    int frames = reply.getNextValueAsInt();
    FrameInfo[] frameInfos = new FrameInfo[frames];
    for (int i = 0; i < frames; i++) {
        long frameID = reply.getNextValueAsLong();
        Location location = reply.getNextValueAsLocation();
        frameInfos[i] = new FrameInfo(frameID, location);
    }
    return frameInfos;
}
 
開發者ID:shannah,項目名稱:cn1,代碼行數:23,代碼來源:LaunchedDebugger.java

示例4: getTopFrameLocation

import org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket; //導入方法依賴的package包/類
@SuppressWarnings("unused")
private Location getTopFrameLocation(long threadID) {

    // getting frames of the thread
    CommandPacket packet = new CommandPacket(
            JDWPCommands.ThreadReferenceCommandSet.CommandSetID,
            JDWPCommands.ThreadReferenceCommandSet.FramesCommand);
    packet.setNextValueAsThreadID(threadID);
    packet.setNextValueAsInt(0);
    packet.setNextValueAsInt(1);
    ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet);
    debuggeeWrapper.vmMirror.checkReply(reply);

    // assert that only one top frame is returned
    int framesCount = reply.getNextValueAsInt();
    assertEquals("Invalid number of top stack frames,", 1, framesCount);

    long frameID = reply.getNextValueAsFrameID();
    Location loc = reply.getNextValueAsLocation();

    return loc;
}
 
開發者ID:shannah,項目名稱:cn1,代碼行數:23,代碼來源:ExceptionTest.java

示例5: getFrames

import org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket; //導入方法依賴的package包/類
private Vector getFrames(int startFrame, int length) {

        Vector<FrameStruct> frames = new Vector<FrameStruct>();
        
        logWriter.println("startFrame=" + startFrame
                + "; length=" + length);

        // getting frames of the thread
        CommandPacket packet = new CommandPacket(
                JDWPCommands.ThreadReferenceCommandSet.CommandSetID,
                JDWPCommands.ThreadReferenceCommandSet.FramesCommand);
        packet.setNextValueAsThreadID(threadID);
        packet.setNextValueAsInt(startFrame);
        packet.setNextValueAsInt(length);
        ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet);
        err = reply.getErrorCode(); 
        if ( err != JDWPConstants.Error.NONE) {
            logWriter.println("\tthreadID=" + threadID
                    + " - " + JDWPConstants.Error.getName(err));
            return null;
        }
        int framesCount = reply.getNextValueAsInt();
        long frameID;
        Location loc;
        logWriter.println("framesCount=" + framesCount);
        for (int j = 0; j < framesCount; j++) {
               frameID = reply.getNextValueAsFrameID();
               loc = reply.getNextValueAsLocation();
               frames.add(new FrameStruct(frameID, loc));
           }
        return frames;
    }
 
開發者ID:shannah,項目名稱:cn1,代碼行數:33,代碼來源:FramesTest.java


注:本文中的org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket.getNextValueAsLocation方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。