java-stack.h (ncodeMap): Declare.
* include/java-stack.h (ncodeMap): Declare. (_Jv_StackTrace): Make _Jv_GetMethodDeclaringClass friend. * java/lang/Class.h (_Jv_GetMethodDeclaringClass): Declare. * java/lang/natClass.cc (_Jv_GetMethodDeclaringClass): New function. * stacktrace.cc (ncodeMap): Redefine from file global to global for class _Jv_StackTrace. (_Jv_StackTrace::UpdateNCodeMap): Add interpreted classes, too, so that _Jv_GetMethodDeclaringClass can find them all. (_Jv_StackTrace::ClassForFrame): Exclude interpreted classes. * jvmti.cc (_Jv_JVMTI_GetMethodDeclaringClass): New function. (_Jv_JVMTI_Interface): Define GetMethodDeclaringClass function. From-SVN: r118100
This commit is contained in:
parent
62baeb4f01
commit
f356a436f0
6 changed files with 73 additions and 20 deletions
|
@ -465,6 +465,24 @@ _Jv_JVMTI_IsMethodSynthetic (MAYBE_UNUSED jvmtiEnv *env, jmethodID method,
|
|||
return JVMTI_ERROR_NONE;
|
||||
}
|
||||
|
||||
static jvmtiError JNICALL
|
||||
_Jv_JVMTI_GetMethodDeclaringClass (MAYBE_UNUSED jvmtiEnv *env,
|
||||
jmethodID method,
|
||||
jclass *declaring_class_ptr)
|
||||
{
|
||||
REQUIRE_PHASE (env, JVMTI_PHASE_LIVE);
|
||||
NULL_CHECK (declaring_class_ptr);
|
||||
|
||||
jclass klass = _Jv_GetMethodDeclaringClass (method);
|
||||
if (klass != NULL)
|
||||
{
|
||||
*declaring_class_ptr = klass;
|
||||
return JVMTI_ERROR_NONE;
|
||||
}
|
||||
|
||||
return JVMTI_ERROR_INVALID_METHODID;
|
||||
}
|
||||
|
||||
static jvmtiError JNICALL
|
||||
_Jv_JVMTI_GetClassLoaderClasses (MAYBE_UNUSED jvmtiEnv *env,
|
||||
jobject init_loader,
|
||||
|
@ -1287,7 +1305,7 @@ struct _Jv_jvmtiEnv _Jv_JVMTI_Interface =
|
|||
_Jv_JVMTI_GetFieldModifiers, // GetFieldModifiers
|
||||
_Jv_JVMTI_IsFieldSynthetic, // IsFieldSynthetic
|
||||
UNIMPLEMENTED, // GetMethodName
|
||||
UNIMPLEMENTED, // GetMethodDeclaringClass
|
||||
_Jv_JVMTI_GetMethodDeclaringClass, // GetMethodDeclaringClass
|
||||
_Jv_JVMTI_GetMethodModifiers, // GetMethodModifers
|
||||
RESERVED, // reserved67
|
||||
UNIMPLEMENTED, // GetMaxLocals
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue