[llvm-commits] [vmkit] r50416 - in /vmkit/trunk/lib/JnJVM/VMCore: JavaInitialise.cpp NativeUtil.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Tue Apr 29 03:33:28 PDT 2008


Author: geoffray
Date: Tue Apr 29 05:33:17 2008
New Revision: 50416

URL: http://llvm.org/viewvc/llvm-project?rev=50416&view=rev
Log:
Output debugging info when crashing.



Modified:
    vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp
    vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp

Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp?rev=50416&r1=50415&r2=50416&view=diff

==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp Tue Apr 29 05:33:17 2008
@@ -211,6 +211,7 @@
 
 void handler(int val, siginfo_t* info, void* addr) {
   printf("Crash in JnJVM at %p\n", addr);
+  JavaJIT::printBacktrace();
   assert(0);
 }
 

Modified: vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp?rev=50416&r1=50415&r2=50416&view=diff

==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp Tue Apr 29 05:33:17 2008
@@ -16,6 +16,7 @@
 #include "JavaArray.h"
 #include "JavaClass.h"
 #include "JavaConstantPool.h"
+#include "JavaJIT.h"
 #include "JavaThread.h"
 #include "JavaTypes.h"
 #include "JavaUpcalls.h"
@@ -208,7 +209,9 @@
       buf = jniConsFromMeth3(cl, meth);
       res = loadName(buf, jnjvm);
       if (!res) {
-        printf("error for %s\n", meth->printString());
+        printf("Native function %s not found. Probably "
+               "not implemented by JnJVM?\n", meth->printString());
+        JavaJIT::printBacktrace();
         JavaThread::get()->isolate->unknownError("can not find native method %s",
                                                  meth->printString());
       }





More information about the llvm-commits mailing list