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
|
@ -23,6 +23,7 @@ details. */
|
|||
#include <java/lang/StackTraceElement.h>
|
||||
#include <java/lang/Throwable.h>
|
||||
#include <java/lang/Thread.h>
|
||||
#include <java/util/IdentityHashMap.h>
|
||||
|
||||
#include <gnu/gcj/runtime/NameFinder.h>
|
||||
|
||||
|
@ -102,6 +103,7 @@ private:
|
|||
int length;
|
||||
_Jv_StackFrame frames[];
|
||||
|
||||
static java::util::IdentityHashMap *ncodeMap;
|
||||
static void UpdateNCodeMap ();
|
||||
static jclass ClassForFrame (_Jv_StackFrame *frame);
|
||||
static void FillInFrameInfo (_Jv_StackFrame *frame);
|
||||
|
@ -126,7 +128,8 @@ public:
|
|||
static JArray<jclass> *GetClassContext (jclass checkClass);
|
||||
static ClassLoader *GetFirstNonSystemClassLoader (void);
|
||||
static jobjectArray GetAccessControlStack ();
|
||||
|
||||
|
||||
friend jclass _Jv_GetMethodDeclaringClass (jmethodID);
|
||||
};
|
||||
|
||||
// Information about a given address.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue