* @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];