本文整理汇总了Java中org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket.getNextValueAsFrameID方法的典型用法代码示例。如果您正苦于以下问题:Java ReplyPacket.getNextValueAsFrameID方法的具体用法?Java ReplyPacket.getNextValueAsFrameID怎么用?Java ReplyPacket.getNextValueAsFrameID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket
的用法示例。
在下文中一共展示了ReplyPacket.getNextValueAsFrameID方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}
示例2: 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;
}
示例3: 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;
}