本文整理汇总了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);
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}