*/
public void testAllThreads002() {
synchronizer.receiveMessage(JPDADebuggeeSynchronizer.SGNL_READY);
logWriter.println("send AllThreads cmd");
CommandPacket packet = new CommandPacket(
JDWPCommands.VirtualMachineCommandSet.CommandSetID,
JDWPCommands.VirtualMachineCommandSet.AllThreadsCommand);
ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet);
checkReplyPacket(reply, "VirtualMachine::AllThreads command");
long threadID;
int threadStatus, suspendStatus;
String threadName;
int count = 0;
ReplyPacket replyName;
int threads = reply.getNextValueAsInt();
logWriter.println("Number of threads = " + threads);
assertTrue("Number of threads must be > 0", threads > 0);
boolean threadStatusFailed = false;
for (int i = 0; i < threads; i++) {
threadID = reply.getNextValueAsThreadID();
threadName = debuggeeWrapper.vmMirror.getThreadName(threadID);
packet = new CommandPacket(
JDWPCommands.ThreadReferenceCommandSet.CommandSetID,
JDWPCommands.ThreadReferenceCommandSet.StatusCommand);
packet.setNextValueAsReferenceTypeID(threadID);
replyName = debuggeeWrapper.vmMirror.performCommand(packet);
checkReplyPacket(replyName, "ThreadReference::Status command");
threadStatus = replyName.getNextValueAsInt();