[vmkit-commits] [vmkit] r56971 - /vmkit/branches/isolate/lib/Mvm/Runtime/JIT.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Thu Oct 2 15:42:01 PDT 2008


Author: geoffray
Date: Thu Oct  2 17:42:01 2008
New Revision: 56971

URL: http://llvm.org/viewvc/llvm-project?rev=56971&view=rev
Log:
Don't use __builtin_frame_addr with a level of 1, as suggested by the GCC
documentation.


Modified:
    vmkit/branches/isolate/lib/Mvm/Runtime/JIT.cpp

Modified: vmkit/branches/isolate/lib/Mvm/Runtime/JIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/isolate/lib/Mvm/Runtime/JIT.cpp?rev=56971&r1=56970&r2=56971&view=diff

==============================================================================
--- vmkit/branches/isolate/lib/Mvm/Runtime/JIT.cpp (original)
+++ vmkit/branches/isolate/lib/Mvm/Runtime/JIT.cpp Thu Oct  2 17:42:01 2008
@@ -315,12 +315,12 @@
 #endif
 
 int mvm::jit::getBacktrace(void** stack, int size) {
-  void** addr = (void**)__builtin_frame_address(1);
+  void** addr = (void**)__builtin_frame_address(0);
   int cpt = 0;
   void* baseSP = mvm::Thread::get()->baseSP;
   while (addr && cpt < size && addr < baseSP && addr < addr[0]) {
-    stack[cpt++] = (void**)FRAME_IP(addr);
     addr = (void**)addr[0];
+    stack[cpt++] = (void**)FRAME_IP(addr);
   }
   return cpt;
 }





More information about the vmkit-commits mailing list