From 976731ee6e809f1201abbed7e85717bda0025fb1 Mon Sep 17 00:00:00 2001 From: Andrew Haley Date: Fri, 13 Jul 2007 14:07:16 +0000 Subject: [multiple changes] 2007-07-13 Andrew Haley * libgcj.ver: Add __gcj_personality_sj0. * testsuite/libjava.jvmti/jvmti-interp.exp: Likewise. * testsuite/libjava.jni/jni.exp: Use -fdollars-in-identifiers. * testsuite/libjava.jni/cni.exp: Use -fdollars-in-identifiers. * testsuite/libjava.jvmti/jvmti.exp (gcj_jvmti_compile_cxx_to_o): Likewise. * gnu/classpath/natVMStackWalker.cc (getCallingClassLoader): Check klass is non-null. * java/lang/reflect/natField.cc (getAddr): Call _Jv_StackTrace::GetCallingClass only if CALLER is non-null. * java/lang/reflect/natVMProxy.cc (run_proxy): Use _Jv_getFieldInternal to get field proxyClass.m. (_Jv_getFieldInternal): New function. 2007-07-11 Andrew Haley * configure.host (arm*-linux-gnu): New. * sysdep/arm/locks.h: New. From-SVN: r126622 --- libjava/gnu/classpath/natVMStackWalker.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'libjava/gnu/classpath/natVMStackWalker.cc') diff --git a/libjava/gnu/classpath/natVMStackWalker.cc b/libjava/gnu/classpath/natVMStackWalker.cc index f7eb883..1b336ca 100644 --- a/libjava/gnu/classpath/natVMStackWalker.cc +++ b/libjava/gnu/classpath/natVMStackWalker.cc @@ -80,15 +80,22 @@ gnu::classpath::VMStackWalker::getClassLoader(::java::lang::Class *c) gnu::classpath::VMStackWalker::getCallingClassLoader(void) { _Jv_InitClass (&::gnu::classpath::VMStackWalker::class$); - return - _Jv_StackTrace::GetStackWalkerCallingClass ()->getClassLoaderInternal (); + jclass klass = _Jv_StackTrace::GetStackWalkerCallingClass (); + if (klass) + return klass->getClassLoaderInternal (); + else + return NULL; } ::java::lang::ClassLoader * gnu::classpath::VMStackWalker::getCallingClassLoader(::gnu::gcj::RawData *pc) { _Jv_InitClass (&::gnu::classpath::VMStackWalker::class$); - return GET_CALLING_CLASS(pc)->getClassLoaderInternal (); + jclass klass = GET_CALLING_CLASS(pc); + if (klass) + return klass->getClassLoaderInternal (); + else + return NULL; } ::java::lang::ClassLoader * -- cgit v1.1