本文整理匯總了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");
}