[Lldb-commits] [lldb] r219247 - When we detect a stack unwind loop, before we abort

Jason Molenda jmolenda at apple.com
Tue Oct 7 15:55:13 PDT 2014


Author: jmolenda
Date: Tue Oct  7 17:55:13 2014
New Revision: 219247

URL: http://llvm.org/viewvc/llvm-project?rev=219247&view=rev
Log:
When we detect a stack unwind loop, before we abort
the backtrace, try falling back to the architecture default
unwind plan and see if we can backtrace a little further.
<rdar://problem/18556719> 

Modified:
    lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp

Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp?rev=219247&r1=219246&r2=219247&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp Tue Oct  7 17:55:13 2014
@@ -408,9 +408,13 @@ RegisterContextLLDB::InitializeNonZeroth
 
             if (CheckIfLoopingStack ())
             {
-                UnwindLogMsg ("same CFA address as next frame, assuming the unwind is looping - stopping");
-                m_frame_type = eNotAValidFrame;
-                return;
+                TryFallbackUnwindPlan();
+                if (CheckIfLoopingStack ())
+                {
+                    UnwindLogMsg ("same CFA address as next frame, assuming the unwind is looping - stopping");
+                    m_frame_type = eNotAValidFrame;
+                    return;
+                }
             }
 
             UnwindLogMsg ("initialized frame cfa is 0x%" PRIx64, (uint64_t) m_cfa);
@@ -583,9 +587,13 @@ RegisterContextLLDB::InitializeNonZeroth
 
     if (CheckIfLoopingStack ())
     {
-        UnwindLogMsg ("same CFA address as next frame, assuming the unwind is looping - stopping");
-        m_frame_type = eNotAValidFrame;
-        return;
+        TryFallbackUnwindPlan();
+        if (CheckIfLoopingStack ())
+        {
+            UnwindLogMsg ("same CFA address as next frame, assuming the unwind is looping - stopping");
+            m_frame_type = eNotAValidFrame;
+            return;
+        }
     }
 
     UnwindLogMsg ("initialized frame current pc is 0x%" PRIx64 " cfa is 0x%" PRIx64,





More information about the lldb-commits mailing list