8003690: Example code in JVMTI GetStackTrace documentation is broken

Fixed to minor errors in example code

Reviewed-by: sspitsyn, dholmes
This commit is contained in:
Mikael Vidstedt 2012-11-21 09:02:13 -08:00
parent 274b3df2dc
commit 5791b1f1c3

View File

@ -2370,11 +2370,11 @@ jint count;
jvmtiError err;
err = (*jvmti)->GetStackTrace(jvmti, aThread, 0, 5,
&frames, &count);
frames, &count);
if (err == JVMTI_ERROR_NONE && count >= 1) {
char *methodName;
err = (*jvmti)->GetMethodName(jvmti, frames[0].method,
&methodName, NULL);
&methodName, NULL, NULL);
if (err == JVMTI_ERROR_NONE) {
printf("Executing method: %s", methodName);
}