8242891: vmTestbase/nsk/jvmti/ test should be fixed to fail early if JVMTI function return error
Reviewed-by: sspitsyn, cjplummer
This commit is contained in:
parent
f8f35d30af
commit
590de670a9
test/hotspot/jtreg/vmTestbase/nsk/jvmti
ClassLoad/classload001
ClassPrepare/classprep001
DestroyRawMonitor/drrawmon001
Exception/exception001
ExceptionCatch/excatch001
FieldAccess
fieldacc001
fieldacc002
fieldacc003
fieldacc004
FieldModification
FramePop
GetAllThreads/allthr001
GetBytecodes/bytecodes003
GetClassLoader
GetClassLoaderClasses/clsldrclss001
GetFrameCount/framecnt001
GetFrameLocation/frameloc002
GetLocalVariable/getlocal001
GetTopThreadGroups/topthrgrp001
IsArrayClass/isarray005
IsInterface/isintrf005
MethodEntry/mentry001
MethodExit
NotifyFramePop/nframepop001
PopFrame/popframe006
RedefineClasses
SetBreakpoint/setbrk008
SetEventNotificationMode/setnotif001
SetFieldModificationWatch/setfmodw002
SetLocalVariable
unit/clsldrclss00x
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -118,6 +118,8 @@ ClassLoad(jvmtiEnv *jvmti_env, JNIEnv *env, jthread thread, jclass klass) {
|
||||
if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(klass, &sig, &generic))) {
|
||||
result = STATUS_FAILED;
|
||||
NSK_COMPLAIN0("TEST FAILURE: unable to obtain a class signature\n");
|
||||
unlock(jvmti_env, env);
|
||||
return;
|
||||
}
|
||||
|
||||
i = findSig(sig, 1);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -102,6 +102,7 @@ void JNICALL ClassPrepare(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetClassSignature#%" PRIuPTR ") unexpected error: %s (%d)\n",
|
||||
eventsCount, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetClassStatus(cls, &inf.status);
|
||||
if (err != JVMTI_ERROR_NONE) {
|
||||
@ -114,12 +115,14 @@ void JNICALL ClassPrepare(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetClassMethods#%" PRIuPTR ") unexpected error: %s (%d)\n",
|
||||
eventsCount, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetClassFields(cls, &inf.fcount, &fields);
|
||||
if (err != JVMTI_ERROR_NONE) {
|
||||
printf("(GetClassMethods#%" PRIuPTR ") unexpected error: %s (%d)\n",
|
||||
eventsCount, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetImplementedInterfaces(cls,
|
||||
&inf.icount, &interfaces);
|
||||
@ -127,6 +130,7 @@ void JNICALL ClassPrepare(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetImplementedInterfaces#%" PRIuPTR ") unexpected error: %s (%d)\n",
|
||||
eventsCount, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
if (printdump == JNI_TRUE) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -57,9 +57,11 @@ void JNICALL VMInit(jvmtiEnv *jvmti_env, JNIEnv *env, jthread thr) {
|
||||
printf("(CreateRawMonitor#%d) unexpected error: %s (%d)\n",
|
||||
i, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
} else if (monitors[i] == NULL) {
|
||||
printf("(CreateRawMonitor#%d) jrawMonitorID is null\n", i);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -95,18 +95,21 @@ Exception(jvmtiEnv *jvmti_env, JNIEnv *env, jthread thr,
|
||||
printf("(GetClassSignature) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetMethodDeclaringClass(method, &cls);
|
||||
if (err != JVMTI_ERROR_NONE) {
|
||||
printf("(GetMethodDeclaringClass#t) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetClassSignature(cls, &ex.t_cls, &generic);
|
||||
if (err != JVMTI_ERROR_NONE) {
|
||||
printf("(GetClassSignature#t) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetMethodName(method,
|
||||
&ex.t_name, &ex.t_sig, &generic);
|
||||
@ -114,6 +117,7 @@ Exception(jvmtiEnv *jvmti_env, JNIEnv *env, jthread thr,
|
||||
printf("(GetMethodName#t) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
ex.t_loc = location;
|
||||
err = jvmti_env->GetMethodDeclaringClass(catch_method, &cls);
|
||||
@ -121,12 +125,14 @@ Exception(jvmtiEnv *jvmti_env, JNIEnv *env, jthread thr,
|
||||
printf("(GetMethodDeclaringClass#c) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetClassSignature(cls, &ex.c_cls, &generic);
|
||||
if (err != JVMTI_ERROR_NONE) {
|
||||
printf("(GetClassSignature#c) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetMethodName(catch_method,
|
||||
&ex.c_name, &ex.c_sig, &generic);
|
||||
@ -134,6 +140,7 @@ Exception(jvmtiEnv *jvmti_env, JNIEnv *env, jthread thr,
|
||||
printf("(GetMethodName#c) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
ex.c_loc = catch_location;
|
||||
if (printdump == JNI_TRUE) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -83,18 +83,21 @@ ExceptionCatch(jvmtiEnv *jvmti_env, JNIEnv *env, jthread thr,
|
||||
printf("(GetClassSignature#e) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetMethodDeclaringClass(method, &cls);
|
||||
if (err != JVMTI_ERROR_NONE) {
|
||||
printf("(GetMethodDeclaringClass) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetClassSignature(cls, &ex.c_cls, &generic);
|
||||
if (err != JVMTI_ERROR_NONE) {
|
||||
printf("(GetClassSignature#c) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetMethodName(method,
|
||||
&ex.c_name, &ex.c_sig, &generic);
|
||||
@ -102,6 +105,7 @@ ExceptionCatch(jvmtiEnv *jvmti_env, JNIEnv *env, jthread thr,
|
||||
printf("(GetMethodName) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
ex.c_loc = location;
|
||||
if (printdump == JNI_TRUE) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -130,6 +130,7 @@ void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetMethodDeclaringClass) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetClassSignature(cls,
|
||||
&watch.m_cls, &generic);
|
||||
@ -137,6 +138,7 @@ void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetClassSignature) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetMethodName(method,
|
||||
&watch.m_name, &watch.m_sig, &generic);
|
||||
@ -144,6 +146,7 @@ void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetMethodName) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetClassSignature(field_klass,
|
||||
&watch.f_cls, &generic);
|
||||
@ -151,6 +154,7 @@ void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetClassSignature) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetFieldName(field_klass, field,
|
||||
&watch.f_name, &watch.f_sig, &generic);
|
||||
@ -158,6 +162,7 @@ void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetFieldName) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
if (printdump == JNI_TRUE) {
|
||||
printf(">>> class: \"%s\"\n", watch.m_cls);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -130,6 +130,7 @@ void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetMethodDeclaringClass) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetClassSignature(cls,
|
||||
&watch.m_cls, &generic);
|
||||
@ -137,6 +138,7 @@ void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetClassSignature) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetMethodName(method,
|
||||
&watch.m_name, &watch.m_sig, &generic);
|
||||
@ -144,6 +146,7 @@ void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetMethodName) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetClassSignature(field_klass,
|
||||
&watch.f_cls, &generic);
|
||||
@ -151,6 +154,7 @@ void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetClassSignature) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetFieldName(field_klass, field,
|
||||
&watch.f_name, &watch.f_sig, &generic);
|
||||
@ -158,6 +162,7 @@ void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetFieldName) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
if (printdump == JNI_TRUE) {
|
||||
printf(">>> class: \"%s\"\n", watch.m_cls);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -109,6 +109,7 @@ void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetMethodDeclaringClass) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetClassSignature(cls,
|
||||
&watch.m_cls, &generic);
|
||||
@ -116,6 +117,7 @@ void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetClassSignature) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetMethodName(method,
|
||||
&watch.m_name, &watch.m_sig, &generic);
|
||||
@ -123,6 +125,7 @@ void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetMethodName) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetClassSignature(field_klass,
|
||||
&watch.f_cls, &generic);
|
||||
@ -130,6 +133,7 @@ void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetClassSignature) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetFieldName(field_klass, field,
|
||||
&watch.f_name, &watch.f_sig, &generic);
|
||||
@ -137,6 +141,7 @@ void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetFieldName) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
if (printdump == JNI_TRUE) {
|
||||
printf(">>> class: \"%s\"\n", watch.m_cls);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -95,6 +95,7 @@ void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetMethodDeclaringClass) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetClassSignature(cls,
|
||||
&watch.m_cls, &generic);
|
||||
@ -102,6 +103,7 @@ void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetClassSignature) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetMethodName(method,
|
||||
&watch.m_name, &watch.m_sig, &generic);
|
||||
@ -109,6 +111,7 @@ void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetMethodName) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetClassSignature(field_klass,
|
||||
&watch.f_cls, &generic);
|
||||
@ -116,6 +119,7 @@ void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetClassSignature) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetFieldName(field_klass, field,
|
||||
&watch.f_name, &watch.f_sig, &generic);
|
||||
@ -123,6 +127,7 @@ void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetFieldName) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
if (printdump == JNI_TRUE) {
|
||||
printf(">>> class: \"%s\"\n", watch.m_cls);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -196,6 +196,7 @@ void JNICALL FieldModification(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetMethodDeclaringClass) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetClassSignature(cls,
|
||||
&watch.m_cls, &generic);
|
||||
@ -203,6 +204,7 @@ void JNICALL FieldModification(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetClassSignature) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetMethodName(method,
|
||||
&watch.m_name, &watch.m_sig, &generic);
|
||||
@ -210,6 +212,7 @@ void JNICALL FieldModification(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetMethodName) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetClassSignature(field_klass,
|
||||
&watch.f_cls, &generic);
|
||||
@ -217,6 +220,7 @@ void JNICALL FieldModification(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetClassSignature) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetFieldName(field_klass, field,
|
||||
&watch.f_name, &watch.f_sig, &generic);
|
||||
@ -224,6 +228,7 @@ void JNICALL FieldModification(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetFieldName) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
if (printdump == JNI_TRUE) {
|
||||
printf(">>> class: \"%s\"\n", watch.m_cls);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -196,6 +196,7 @@ void JNICALL FieldModification(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetMethodDeclaringClass) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetClassSignature(cls,
|
||||
&watch.m_cls, &generic);
|
||||
@ -203,12 +204,14 @@ void JNICALL FieldModification(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetClassSignature) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetMethodName(method, &watch.m_name, &watch.m_sig, &generic);
|
||||
if (err != JVMTI_ERROR_NONE) {
|
||||
printf("(GetMethodName) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetClassSignature(field_klass,
|
||||
&watch.f_cls, &generic);
|
||||
@ -216,6 +219,7 @@ void JNICALL FieldModification(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetClassSignature) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetFieldName(field_klass, field,
|
||||
&watch.f_name, &watch.f_sig, &generic);
|
||||
@ -223,6 +227,7 @@ void JNICALL FieldModification(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetFieldName) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
if (printdump == JNI_TRUE) {
|
||||
printf(">>> class: \"%s\"\n", watch.m_cls);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -92,18 +92,21 @@ void JNICALL FramePop(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetMethodDeclaringClass) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetClassSignature(cls, &cls_sig, &generic);
|
||||
if (err != JVMTI_ERROR_NONE) {
|
||||
printf("(GetClassSignature) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetMethodName(method, &name, &sig, &generic);
|
||||
if (err != JVMTI_ERROR_NONE) {
|
||||
printf("(GetMethodName) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetFrameLocation(thr, 0, &mid, &loc);
|
||||
if (err != JVMTI_ERROR_NONE) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -99,6 +99,7 @@ void printInfo(jvmtiEnv *jvmti_env, jthread thr, jmethodID method, int depth) {
|
||||
printf("(GetMethodDeclaringClass) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
err = jvmti_env->GetClassSignature(cls, &clsig, &generic);
|
||||
@ -106,6 +107,7 @@ void printInfo(jvmtiEnv *jvmti_env, jthread thr, jmethodID method, int depth) {
|
||||
printf("(GetClassSignature) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
err = jvmti_env->GetMethodName(method, &name, &sig, &generic);
|
||||
@ -113,6 +115,7 @@ void printInfo(jvmtiEnv *jvmti_env, jthread thr, jmethodID method, int depth) {
|
||||
printf("(GetMethodName) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
printf(" %s: %s.%s%s, depth = %d\n", inf.name, clsig, name, sig, depth);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -193,6 +193,7 @@ JNIEXPORT void checkInfo(JNIEnv *env, int ind) {
|
||||
printf("Failed to get all threads (check): %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < threadsCount; i++) {
|
||||
@ -205,6 +206,7 @@ JNIEXPORT void checkInfo(JNIEnv *env, int ind) {
|
||||
printf("Point %d: number of threads expected: %d, got: %d\n",
|
||||
ind, thrInfo[ind].cnt + sys_cnt, threadsCount - num_unexpected);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < thrInfo[ind].cnt; i++) {
|
||||
@ -214,6 +216,7 @@ JNIEXPORT void checkInfo(JNIEnv *env, int ind) {
|
||||
printf("Failed to get thread info: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
if (printdump == JNI_TRUE) {
|
||||
printf(" >>> %s", inf.name);
|
||||
@ -273,6 +276,7 @@ JNIEXPORT void JNICALL Java_nsk_jvmti_GetAllThreads_allthr001_setSysCnt(JNIEnv *
|
||||
printf("Failed to get all threads (count): %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
sys_cnt = threadsCount - 1;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -330,12 +330,14 @@ void JNICALL ClassPrepare(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetClassSignature#%d) unexpected error: %s (%d)\n",
|
||||
eventsCount, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetClassMethods(cls, &mcount, &methods);
|
||||
if (err != JVMTI_ERROR_NONE) {
|
||||
printf("(GetClassMethods#%d) unexpected error: %s (%d)\n",
|
||||
eventsCount, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
if (printdump == JNI_TRUE) {
|
||||
@ -359,6 +361,7 @@ void JNICALL ClassPrepare(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
TranslateError(err), err);
|
||||
printf(" class: \"%s\"\n", sig);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
isNative = JNI_TRUE;
|
||||
err = jvmti_env->IsMethodNative(methods[i], &isNative);
|
||||
@ -368,6 +371,7 @@ void JNICALL ClassPrepare(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf(" class: \"%s\"\n", sig);
|
||||
printf(" method = \"%s%s\"\n", name, msig);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
if (isNative == JNI_TRUE) {
|
||||
if (printdump == JNI_TRUE) {
|
||||
@ -380,6 +384,7 @@ void JNICALL ClassPrepare(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetBytecodes#%d:%d) unexpected error: %s (%d)\n",
|
||||
eventsCount, i, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
} else {
|
||||
if (printdump == JNI_TRUE) {
|
||||
printf(">>> \"%s%s\", %d bytes\n",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -82,6 +82,7 @@ Java_nsk_jvmti_GetClassLoader_getclsldr002_check(JNIEnv *env,
|
||||
printf("(GetClassSignature#%d) unexpected error: %s (%d)\n",
|
||||
i, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
err = jvmti->GetClassLoader(clazz, &classloader);
|
||||
@ -89,6 +90,7 @@ Java_nsk_jvmti_GetClassLoader_getclsldr002_check(JNIEnv *env,
|
||||
printf("(GetClassLoader#%d) unexpected error: %s (%d)\n",
|
||||
i, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
if (printdump == JNI_TRUE) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -82,6 +82,7 @@ Java_nsk_jvmti_GetClassLoader_getclsldr003_check(JNIEnv *env,
|
||||
printf("(GetClassSignature) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
err = jvmti->GetClassLoader(clazz, &classloader);
|
||||
@ -89,6 +90,7 @@ Java_nsk_jvmti_GetClassLoader_getclsldr003_check(JNIEnv *env,
|
||||
printf("(GetClassLoader) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
if (printdump == JNI_TRUE) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -81,6 +81,7 @@ Java_nsk_jvmti_GetClassLoaderClasses_clsldrclss001_check(JNIEnv *env, jclass cls
|
||||
printf("(GetClassLoader) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return STATUS_FAILED;
|
||||
}
|
||||
|
||||
if (printdump == JNI_TRUE) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -101,6 +101,7 @@ JNIEXPORT void JNICALL Java_nsk_jvmti_GetFrameCount_framecnt001_checkFrames(JNIE
|
||||
printf("(SuspendThread#%d) unexpected error: %s (%d)\n",
|
||||
thr_num, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
}
|
||||
err = jvmti->GetFrameCount(thr, &frameCount);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -97,6 +97,7 @@ Java_nsk_jvmti_GetFrameLocation_frameloc002_check(JNIEnv *env, jclass cls, jthre
|
||||
printf("(GetFrameLocation) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return result;
|
||||
}
|
||||
|
||||
if (printdump == JNI_TRUE) {
|
||||
@ -107,18 +108,21 @@ Java_nsk_jvmti_GetFrameLocation_frameloc002_check(JNIEnv *env, jclass cls, jthre
|
||||
printf("(GetMethodDeclaringClass) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return result;
|
||||
}
|
||||
err = jvmti->GetClassSignature(klass, &cls_sig, &generic);
|
||||
if (err != JVMTI_ERROR_NONE) {
|
||||
printf("(GetClassSignature) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return result;
|
||||
}
|
||||
err = jvmti->GetMethodName(mid, &name, &sig, &generic);
|
||||
if (err != JVMTI_ERROR_NONE) {
|
||||
printf("(GetMethodName) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return result;
|
||||
}
|
||||
|
||||
if (printdump == JNI_TRUE) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -295,6 +295,7 @@ void JNICALL MethodExit(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetLocalVariableTable#1) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
if (mid == mid1) {
|
||||
if (printdump == JNI_TRUE) {
|
||||
@ -342,12 +343,14 @@ void JNICALL Breakpoint(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetFrameLocation) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetLocalVariableTable(mid, &entryCount, &table);
|
||||
if (err != JVMTI_ERROR_NONE) {
|
||||
printf("(GetLocalVariableTable#2) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
if (mid == mid1) {
|
||||
if (printdump == JNI_TRUE) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -84,6 +84,7 @@ Java_nsk_jvmti_GetTopThreadGroups_topthrgrp001_check(JNIEnv *env, jclass cls) {
|
||||
printf("(GetTopThreadGroups) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return result;
|
||||
}
|
||||
|
||||
if (printdump == JNI_TRUE) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -86,6 +86,7 @@ Java_nsk_jvmti_IsArrayClass_isarray005_check(JNIEnv *env,
|
||||
printf("(GetClassSignature) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
err = jvmti->IsArrayClass(clazz, &isArrayClass);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -85,6 +85,7 @@ Java_nsk_jvmti_IsInterface_isintrf005_check(JNIEnv *env, jclass cls, jclass claz
|
||||
printf("(GetClassSignature) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
err = jvmti->IsInterface(clazz, &isInterface);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -73,12 +73,14 @@ void JNICALL MethodEntry(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetMethodDeclaringClass) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetClassSignature(cls, &cls_sig, &generic);
|
||||
if (err != JVMTI_ERROR_NONE) {
|
||||
printf("(GetClassSignature) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
if (cls_sig != NULL &&
|
||||
strcmp(cls_sig, "Lnsk/jvmti/MethodEntry/mentry001;") == 0) {
|
||||
@ -91,12 +93,14 @@ void JNICALL MethodEntry(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetMethodName) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetFrameLocation(thr, 0, &mid, &entry.loc);
|
||||
if (err != JVMTI_ERROR_NONE) {
|
||||
printf("(GetFrameLocation) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
if (printdump == JNI_TRUE) {
|
||||
printf(">>> class: \"%s\"\n", cls_sig);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -69,12 +69,14 @@ void JNICALL MethodExit(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetMethodDeclaringClass) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetClassSignature(cls, &cls_sig, &generic);
|
||||
if (err != JVMTI_ERROR_NONE) {
|
||||
printf("(GetClassSignature) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
if (cls_sig != NULL &&
|
||||
strcmp(cls_sig, "Lnsk/jvmti/MethodExit/mexit001a;") == 0) {
|
||||
@ -87,12 +89,14 @@ void JNICALL MethodExit(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetMethodName) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetFrameLocation(thr, 0, &mid, &loc);
|
||||
if (err != JVMTI_ERROR_NONE) {
|
||||
printf("(GetFrameLocation) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
if (printdump == JNI_TRUE) {
|
||||
printf(">>> class: \"%s\"\n", cls_sig);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
/*
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -69,12 +69,14 @@ void JNICALL MethodExit(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetMethodDeclaringClass) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetClassSignature(cls, &cls_sig, &generic);
|
||||
if (err != JVMTI_ERROR_NONE) {
|
||||
printf("(GetClassSignature) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
if (cls_sig != NULL &&
|
||||
strcmp(cls_sig, "Lnsk/jvmti/MethodExit/mexit002a;") == 0) {
|
||||
@ -87,12 +89,14 @@ void JNICALL MethodExit(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetMethodName) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetFrameLocation(thr, 0, &mid, &loc);
|
||||
if (err != JVMTI_ERROR_NONE) {
|
||||
printf("(GetFrameLocation) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
if (printdump == JNI_TRUE) {
|
||||
printf(">>> class: \"%s\"\n", cls_sig);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -57,6 +57,7 @@ FramePop(jvmtiEnv *jvmti_env, JNIEnv *env, jthread thread,
|
||||
printf("(GetMethodDeclaringClass) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
popClass = (jclass) env->NewGlobalRef(popClass);
|
||||
|
||||
@ -88,6 +89,7 @@ ExceptionCatch(jvmtiEnv *jvmti_env, JNIEnv *env, jthread thread,
|
||||
printf("(GetMethodDeclaringClass) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
currClass = (jclass) env->NewGlobalRef(currClass);
|
||||
|
||||
@ -237,6 +239,7 @@ Java_nsk_jvmti_NotifyFramePop_nframepop001_setFramePopNotif(JNIEnv *env,
|
||||
printf("(SuspendThread) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
currThread = env->NewGlobalRef(thr);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -98,6 +98,7 @@ void check(jvmtiEnv *jvmti_env, jmethodID mid, jlocation loc, int i) {
|
||||
printf("(%s, GetClassSignature#%d) unexpected error: %s (%d)\n",
|
||||
note, i, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
err = jvmti_env->GetMethodName(mid, &name, &sig, &generic);
|
||||
@ -105,6 +106,7 @@ void check(jvmtiEnv *jvmti_env, jmethodID mid, jlocation loc, int i) {
|
||||
printf("(%s, GetMethodName#%d) unexpected error: %s (%d)\n",
|
||||
note, i, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
if (sigClass == NULL || strcmp(sigClass, checks[i].cls) != 0) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -58,6 +58,7 @@ void check(jvmtiEnv *jvmti_env, jthread thr, jclass cls, jmethodID mid, jint i)
|
||||
printf("(GetClassSignature#%d) unexpected error: %s (%d)\n",
|
||||
i, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
err = jvmti_env->GetMethodName(mid, &name, &sig, &generic);
|
||||
@ -65,6 +66,7 @@ void check(jvmtiEnv *jvmti_env, jthread thr, jclass cls, jmethodID mid, jint i)
|
||||
printf("(GetMethodName#%d) unexpected error: %s (%d)\n",
|
||||
i, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
err = jvmti_env->GetLocalVariableTable(mid,
|
||||
@ -73,6 +75,7 @@ void check(jvmtiEnv *jvmti_env, jthread thr, jclass cls, jmethodID mid, jint i)
|
||||
printf("(GetLocalVariableTable#%d) unexpected error: %s (%d)\n",
|
||||
i, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
if (table != NULL) {
|
||||
for (j = 0; j < entryCount; j++) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -116,6 +116,7 @@ void check(jvmtiEnv *jvmti_env, jthread thr, jmethodID mid, jint i) {
|
||||
printf("(GetClassSignature#%d) unexpected error: %s (%d)\n",
|
||||
i, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
err = jvmti_env->GetMethodDeclaringClass(mid, &cls);
|
||||
@ -123,6 +124,7 @@ void check(jvmtiEnv *jvmti_env, jthread thr, jmethodID mid, jint i) {
|
||||
printf("(GetMethodDeclaringClass#%d) unexpected error: %s (%d)\n",
|
||||
i, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
err = jvmti_env->GetClassSignature(cls, &sigClass, &generic);
|
||||
@ -130,6 +132,7 @@ void check(jvmtiEnv *jvmti_env, jthread thr, jmethodID mid, jint i) {
|
||||
printf("(GetClassSignature#%d) unexpected error: %s (%d)\n",
|
||||
i, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
if (sigClass == NULL || strcmp(sigClass, cls_exp) != 0) {
|
||||
@ -145,6 +148,7 @@ void check(jvmtiEnv *jvmti_env, jthread thr, jmethodID mid, jint i) {
|
||||
printf("(GetMethodName#%d) unexpected error: %s (%d)\n",
|
||||
i, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
err = jvmti_env->IsMethodObsolete(mid, &is_obsolete);
|
||||
@ -180,6 +184,7 @@ void check(jvmtiEnv *jvmti_env, jthread thr, jmethodID mid, jint i) {
|
||||
printf("(GetClassSignature#%d) unexpected error: %s (%d)\n",
|
||||
i, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
if (lines != NULL && entryCount > 0) {
|
||||
@ -202,6 +207,7 @@ void check(jvmtiEnv *jvmti_env, jthread thr, jmethodID mid, jint i) {
|
||||
printf("(GetLocalVariableTable#%d) unexpected error: %s (%d)\n",
|
||||
i, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
if (frames[i].count != entryCount) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -61,18 +61,21 @@ void JNICALL Breakpoint(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetMethodDeclaringClass#%d) unexpected error: %s (%d)\n",
|
||||
eventsCount, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti_env->GetClassSignature(cls, &cls_sig, &generic);
|
||||
if (err != JVMTI_ERROR_NONE) {
|
||||
printf("(GetClassSignature#%d) unexpected error: %s (%d)\n",
|
||||
eventsCount, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti->GetMethodName(method, &name, &sig, &generic);
|
||||
if (err != JVMTI_ERROR_NONE) {
|
||||
printf("(GetMethodName#%d) unexpected error: %s (%d)\n",
|
||||
eventsCount, TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
if (printdump == JNI_TRUE && eventsCount == 1) {
|
||||
printf(">>> class: \"%s\"\n", cls_sig);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -120,6 +120,11 @@ void setWatches(jvmtiEnv *jvmti_env, JNIEnv *env, jclass cls) {
|
||||
jmethodID mid;
|
||||
|
||||
mid = env->GetStaticMethodID(cls, "meth01", "(I)V");
|
||||
if (mid == NULL) {
|
||||
printf("(GetStaticMethodID) returns NULL");
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
err = jvmti->SetBreakpoint(mid, 0);
|
||||
if (err == JVMTI_ERROR_NONE) {
|
||||
enable(jvmti_env, JVMTI_EVENT_BREAKPOINT);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -115,6 +115,11 @@ Java_nsk_jvmti_SetFieldModificationWatch_setfmodw002_check(JNIEnv *env,
|
||||
jfieldID fid;
|
||||
|
||||
fid = env->GetStaticFieldID(cls, "fld1", "I");
|
||||
if (fid == NULL) {
|
||||
printf("(GetStaticFieldID) returns NULL");
|
||||
result = STATUS_FAILED;
|
||||
return result;
|
||||
}
|
||||
|
||||
if (!caps.can_generate_field_modification_events) {
|
||||
err = jvmti->SetFieldModificationWatch(cls, fid);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -58,6 +58,7 @@ void JNICALL Breakpoint(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetFrameLocation) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
err = jvmti_env->GetLocalVariableTable(mid,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -54,6 +54,7 @@ void JNICALL Breakpoint(jvmtiEnv *jvmti_env, JNIEnv *env,
|
||||
printf("(GetFrameLocation) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return;
|
||||
}
|
||||
|
||||
if (printdump == JNI_TRUE) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -84,10 +84,12 @@ Java_nsk_jvmti_unit_clsldrclss00x_check(JNIEnv *env, jclass appCls, jclass objCl
|
||||
printf("(GetClassLoader app) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return result;
|
||||
}
|
||||
if (appClassloader == NULL) {
|
||||
printf("(GetClassLoader app) unexpected loader - NULL\n");
|
||||
result = STATUS_FAILED;
|
||||
return result;
|
||||
}
|
||||
|
||||
err = jvmti->GetClassLoader(objCls, &objClassloader);
|
||||
@ -95,16 +97,19 @@ Java_nsk_jvmti_unit_clsldrclss00x_check(JNIEnv *env, jclass appCls, jclass objCl
|
||||
printf("(GetClassLoader obj) unexpected error: %s (%d)\n",
|
||||
TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return result;
|
||||
}
|
||||
if (objClassloader != NULL) {
|
||||
printf("(GetClassLoader obj) unexpected loader - !NULL\n");
|
||||
result = STATUS_FAILED;
|
||||
return result;
|
||||
}
|
||||
|
||||
err = jvmti->GetClassLoaderClasses(appClassloader, &classCount, &classes);
|
||||
if (err != JVMTI_ERROR_NONE) {
|
||||
printf("Error (GetClassLoaderClasses app): %s (%d)\n", TranslateError(err), err);
|
||||
result = STATUS_FAILED;
|
||||
return result;
|
||||
}
|
||||
if (printdump) {
|
||||
printf(">>> number of classes in app class loader: %d\n", classCount);
|
||||
|
Loading…
x
Reference in New Issue
Block a user