[Lldb-commits] [lldb] r191430 - Fix the partial backtrace in a recursive inferior compiled with -fomit-frame-pointer.

Ashok Thirumurthi ashok.thirumurthi at intel.com
Thu Sep 26 07:35:59 PDT 2013


Author: athirumu
Date: Thu Sep 26 09:35:59 2013
New Revision: 191430

URL: http://llvm.org/viewvc/llvm-project?rev=191430&view=rev
Log:
Fix the partial backtrace in a recursive inferior compiled with -fomit-frame-pointer.

- Removes the block in UnwindLLDB::AddOneMoreFrame that tests for a bad stack setup,
since it is neither correct (tests the FP GPR), complete (doesn't consider multi-frame
cycles), nor reachable (the construction of RegisterContextLLDB will fail in the case 
where either of the two (why just two?) previous frames have the same canonical frame
address as the frame that we propose adding to the stack).

Modified:
    lldb/trunk/source/Plugins/Process/Utility/UnwindLLDB.cpp
    lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py

Modified: lldb/trunk/source/Plugins/Process/Utility/UnwindLLDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/UnwindLLDB.cpp?rev=191430&r1=191429&r2=191430&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/UnwindLLDB.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/UnwindLLDB.cpp Thu Sep 26 09:35:59 2013
@@ -185,21 +185,7 @@ UnwindLLDB::AddOneMoreFrame (ABI *abi)
         }
         goto unwind_done;
     }
-    if (!m_frames.empty())
-    {
-        if (m_frames.back()->start_pc == cursor_sp->start_pc)
-        {
-            if (m_frames.back()->cfa == cursor_sp->cfa)
-                goto unwind_done; // Infinite loop where the current cursor is the same as the previous one...
-            else if (abi && abi->StackUsesFrames())
-            {
-                // We might have a CFA that is not using the frame pointer and
-                // we want to validate that the frame pointer is valid.
-                if (reg_ctx_sp->GetFP() == 0)
-                    goto unwind_done;
-            }
-        }
-    }
+
     cursor_sp->reg_ctx_lldb_sp = reg_ctx_sp;
     m_frames.push_back (cursor_sp);
     return true;

Modified: lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py?rev=191430&r1=191429&r2=191430&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py (original)
+++ lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py Thu Sep 26 09:35:59 2013
@@ -15,7 +15,6 @@ class CrashingRecursiveInferiorTestCase(
         self.buildDsym()
         self.recursive_inferior_crashing()
 
-    @expectedFailureLinux('llvm.org/pr15415', ['gcc', 'clang']) # partial backtrace with -fomit-frame-pointer with tool-chains that support this option
     def test_recursive_inferior_crashing_dwarf(self):
         """Test that lldb reliably catches the inferior crashing (command)."""
         self.buildDwarf()
@@ -82,7 +81,7 @@ class CrashingRecursiveInferiorTestCase(
         self.recursive_inferior_crashing_expr_step_expr()
 
     @expectedFailureFreeBSD('llvm.org/pr17184')
-    @expectedFailureLinux # due to llvm.org/pr15415 with -fomit-frame-pointer, and pr15989 with ebp/rbp
+    @expectedFailureLinux # llvm.org/pr15989 - Couldn't allocate space for the stack frame
     def test_recursive_inferior_crashing_expr_step_and_expr_dwarf(self):
         """Test that lldb expressions work before and after stepping after a crash."""
         self.buildDwarf()





More information about the lldb-commits mailing list