當前位置: 首頁>>代碼示例>>Java>>正文


Java CommandPacket.setNextValueAsFrameID方法代碼示例

本文整理匯總了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");
}
 
開發者ID:inferjay,項目名稱:r8,代碼行數:17,代碼來源:DebugTestBase.java

示例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;
}
 
開發者ID:shannah,項目名稱:cn1,代碼行數:32,代碼來源:VmMirror.java

示例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));
}
 
開發者ID:shannah,項目名稱:cn1,代碼行數:30,代碼來源:VmMirror.java

示例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;
}
 
開發者ID:shannah,項目名稱:cn1,代碼行數:20,代碼來源:VmMirror.java

示例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));
}
 
開發者ID:shannah,項目名稱:cn1,代碼行數:15,代碼來源:VmMirror.java

示例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");
}
 
開發者ID:shannah,項目名稱:cn1,代碼行數:12,代碼來源:JDWPStackFrameTestCase.java


注:本文中的org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket.setNextValueAsFrameID方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。