当前位置: 首页>>代码示例>>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;未经允许,请勿转载。