JDWPCommands.MethodCommandSet.VariableTableCommand);
command.setNextValueAsReferenceTypeID(classID);
command.setNextValueAsMethodID(methodID);
// ReplyPacket reply =
// debuggeeWrapper.vmMirror.checkReply(debuggeeWrapper.vmMirror.performCommand(command));
ReplyPacket reply = performCommand(command);
if (reply.getErrorCode() == JDWPConstants.Error.ABSENT_INFORMATION
|| reply.getErrorCode() == JDWPConstants.Error.NATIVE_METHOD) {
return null;
}
checkReply(reply);
reply.getNextValueAsInt(); // argCnt, is not used
int slots = reply.getNextValueAsInt();
if (slots == 0) {
return null;
}
ArrayList vars = new ArrayList(slots);
for (int i = 0; i < slots; i++) {
Variable var = new Frame().new Variable();
var.setCodeIndex(reply.getNextValueAsLong());
var.setName(reply.getNextValueAsString());
var.setSignature(reply.getNextValueAsString());
var.setLength(reply.getNextValueAsInt());
var.setSlot(reply.getNextValueAsInt());
vars.add(var);
}
return vars;
}