for (int i = 0; i < expectedCount; i++) { if (thread.frameCount() < maxDepth) { if (granularity.equals("line")) {
stepEvent = stepIntoLine(thread);
} else {
stepEvent = stepIntoInstruction(thread);
}
} else { if (granularity.equals("line")) {
stepEvent = stepOverLine(thread);
} else {
stepEvent = stepOverInstruction(thread);
}
}
System.out.println("Step #" + (i+1) + "complete at " +
stepEvent.location().method().name() + ":" +
stepEvent.location().lineNumber() + " (" +
stepEvent.location().codeIndex() + "), frameCount = " + thread.frameCount()); if (thread.frameCount() < 2) { // We have stepped one step too far. If we did exactly // the 'workaround' number of steps, then this is in all // likelihood the non IA64 VM. So, stop. if (i == workaroundCount) {
lastStepNeeded = false; break;
} // Gone too far, past return of go() thrownew Exception("Stepped too far");
}
}
if (thread.frameCount() > 2) { // Not far enough thrownew Exception("Didn't step far enough (" + thread.frame(0) + ")");
}
if (lastStepNeeded) { // One last step takes us out of go()
stepIntoLine(thread);
} if (thread.frameCount() != 1) { // Gone too far thrownew Exception("Didn't step far enough (" + thread.frame(0) + ")");
}
// Allow application to complete
resumeToVMDisconnect();
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.