[vmkit-commits] [vmkit] r86831 - in /vmkit/trunk: include/mvm/Threads/Thread.h lib/Mvm/CommonThread/ctthread.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Wed Nov 11 03:40:22 PST 2009


Author: geoffray
Date: Wed Nov 11 05:40:21 2009
New Revision: 86831

URL: http://llvm.org/viewvc/llvm-project?rev=86831&view=rev
Log:
Get the caller of the startKnownFrame's caller.



Modified:
    vmkit/trunk/include/mvm/Threads/Thread.h
    vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp

Modified: vmkit/trunk/include/mvm/Threads/Thread.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/Threads/Thread.h?rev=86831&r1=86830&r2=86831&view=diff

==============================================================================
--- vmkit/trunk/include/mvm/Threads/Thread.h (original)
+++ vmkit/trunk/include/mvm/Threads/Thread.h Wed Nov 11 05:40:21 2009
@@ -336,7 +336,7 @@
   ///
   KnownFrame* lastKnownFrame;
 
-  void startKnownFrame(KnownFrame& F);
+  void startKnownFrame(KnownFrame& F) __attribute__ ((noinline));
   void endKnownFrame();
 };
 

Modified: vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp?rev=86831&r1=86830&r2=86831&view=diff

==============================================================================
--- vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp (original)
+++ vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp Wed Nov 11 05:40:21 2009
@@ -49,7 +49,10 @@
 }
 
 void Thread::startKnownFrame(KnownFrame& F) {
+  // Get the caller of this function
   void** cur = (void**)FRAME_PTR();
+  // Get the caller of the caller.
+  cur = (void**)cur[0];
   F.previousFrame = lastKnownFrame;
   F.currentFP = cur;
   lastKnownFrame = &F;





More information about the vmkit-commits mailing list