本文整理汇总了Java中org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket.setNextValueAsFrameID方法的典型用法代码示例。如果您正苦于以下问题:Java CommandPacket.setNextValueAsFrameID方法的具体用法?Java CommandPacket.setNextValueAsFrameID怎么用?Java CommandPacket.setNextValueAsFrameID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket
的用法示例。
在下文中一共展示了CommandPacket.setNextValueAsFrameID方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: perform
import org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket; //导入方法依赖的package包/类
@Override
public void perform(JUnit3Wrapper testBase) {
Optional<Variable> localVar =
getVariableAt(testBase.getMirror(), testBase.debuggeeState.getLocation(), localName);
Assert.assertTrue("No local '" + localName + "'", localVar.isPresent());
CommandPacket setValues = new CommandPacket(StackFrameCommandSet.CommandSetID,
StackFrameCommandSet.SetValuesCommand);
setValues.setNextValueAsThreadID(testBase.getDebuggeeState().getThreadId());
setValues.setNextValueAsFrameID(testBase.getDebuggeeState().getFrameId());
setValues.setNextValueAsInt(1);
setValues.setNextValueAsInt(localVar.get().getSlot());
setValues.setNextValueAsValue(newValue);
ReplyPacket replyPacket = testBase.getMirror().performCommand(setValues);
testBase.checkReplyPacket(replyPacket, "StackFrame.SetValues");
}
示例2: getFrameValues
import org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket; //导入方法依赖的package包/类
/**
* Returns values of local variables in a given frame
*
* @param frame
* Frame whose variables to get
* @return An array of Value objects
*/
public final Value[] getFrameValues(Frame frame) {
CommandPacket command = new CommandPacket(
JDWPCommands.StackFrameCommandSet.CommandSetID,
JDWPCommands.StackFrameCommandSet.GetValuesCommand);
command.setNextValueAsThreadID(frame.getThreadID());
command.setNextValueAsFrameID(frame.getID());
int slots = frame.getVars().size();
command.setNextValueAsInt(slots);
Iterator it = frame.getVars().iterator();
while (it.hasNext()) {
Frame.Variable var = (Frame.Variable) it.next();
command.setNextValueAsInt(var.getSlot());
command.setNextValueAsByte(var.getTag());
}
ReplyPacket reply = checkReply(performCommand(command));
reply.getNextValueAsInt(); // number of values , is not used
Value[] values = new Value[slots];
for (int i = 0; i < slots; i++) {
values[i] = reply.getNextValueAsValue();
}
return values;
}
示例3: setLocalVars
import org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket; //导入方法依赖的package包/类
/**
* Sets the value of one or more local variables
*
* @param frame
* The frame ID.
* @param vars
* An array of Variable objects whose values to set
* @param values
* An array of Value objects to set
*/
public final void setLocalVars(Frame frame, Variable[] vars, Value[] values) {
if (vars.length != values.length) {
throw new TestErrorException(
"Number of variables doesn't correspond to number of their values");
}
CommandPacket command = new CommandPacket(
JDWPCommands.StackFrameCommandSet.CommandSetID,
JDWPCommands.StackFrameCommandSet.SetValuesCommand);
command.setNextValueAsThreadID(frame.getThreadID());
command.setNextValueAsFrameID(frame.getID());
command.setNextValueAsInt(vars.length);
for (int i = 0; i < vars.length; i++) {
command.setNextValueAsInt(vars[i].getSlot());
command.setNextValueAsValue(values[i]);
}
checkReply(performCommand(command));
}
示例4: getThisObject
import org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket; //导入方法依赖的package包/类
/**
* Returns the value of the 'this' reference for this frame
*
* @param threadID
* The frame's thread ID
* @param frameID
* The frame ID.
* @return The 'this' object ID for this frame.
*/
public final long getThisObject(long threadID, long frameID) {
CommandPacket command = new CommandPacket(
JDWPCommands.StackFrameCommandSet.CommandSetID,
JDWPCommands.StackFrameCommandSet.ThisObjectCommand);
command.setNextValueAsThreadID(threadID);
command.setNextValueAsFrameID(frameID);
ReplyPacket reply = checkReply(performCommand(command));
TaggedObject taggedObject = reply.getNextValueAsTaggedObject();
return taggedObject.objectID;
}
示例5: popFrame
import org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket; //导入方法依赖的package包/类
/**
* Processes JDWP PopFrames command from StackFrame command set.
*
* @param frame
* The instance of Frame.
*/
public final void popFrame(Frame frame) {
CommandPacket command = new CommandPacket(
JDWPCommands.StackFrameCommandSet.CommandSetID,
JDWPCommands.StackFrameCommandSet.PopFramesCommand);
command.setNextValueAsThreadID(frame.getThreadID());
command.setNextValueAsFrameID(frame.getID());
checkReply(performCommand(command));
}
示例6: jdwpPopFrames
import org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket; //导入方法依赖的package包/类
protected void jdwpPopFrames(long threadID, long frameID) {
CommandPacket popFramesCommand = new CommandPacket(
JDWPCommands.StackFrameCommandSet.CommandSetID,
JDWPCommands.StackFrameCommandSet.PopFramesCommand);
popFramesCommand.setNextValueAsThreadID(threadID);
popFramesCommand.setNextValueAsFrameID(frameID);
ReplyPacket reply = debuggeeWrapper.vmMirror
.performCommand(popFramesCommand);
checkReplyPacket(reply, "StackFrame::PopFramesCommand command");
}