summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py2
-rw-r--r--lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp29
2 files changed, 27 insertions, 4 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py b/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py
index a419500f7a1..c0a311f7ac9 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py
@@ -14,7 +14,7 @@ import lldbsuite.test.lldbutil as lldbutil
class NoreturnUnwind(TestBase):
mydir = TestBase.compute_mydir(__file__)
- @expectedFailurei386 #xfail to get buildbot green, failing config: i386 binary running on ubuntu 14.04 x86_64
+ @expectedFailurei386("llvm.org/pr25338")
@skipIfWindows # clang-cl does not support gcc style attributes.
def test (self):
"""Test that we can backtrace correctly with 'noreturn' functions on the stack"""
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
index 278a1d5dabf..efda0edb70c 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
@@ -265,9 +265,32 @@ RegisterContextLLDB::InitializeZerothFrame()
if (!ReadCFAValueForRow (row_register_kind, active_row, m_cfa))
{
- UnwindLogMsg ("could not read CFA register for this frame.");
- m_frame_type = eNotAValidFrame;
- return;
+ // Try the fall back unwind plan since the
+ // full unwind plan failed.
+ FuncUnwindersSP func_unwinders_sp;
+ UnwindPlanSP call_site_unwind_plan;
+ bool cfa_status = false;
+
+ if (m_sym_ctx_valid)
+ {
+ func_unwinders_sp = pc_module_sp->GetObjectFile()->GetUnwindTable().GetFuncUnwindersContainingAddress (m_current_pc, m_sym_ctx);
+ }
+
+ if(func_unwinders_sp.get() != nullptr)
+ call_site_unwind_plan = func_unwinders_sp->GetUnwindPlanAtCallSite(process->GetTarget(), m_current_offset_backed_up_one);
+
+ if (call_site_unwind_plan.get() != nullptr)
+ {
+ m_fallback_unwind_plan_sp = call_site_unwind_plan;
+ if(TryFallbackUnwindPlan())
+ cfa_status = true;
+ }
+ if (!cfa_status)
+ {
+ UnwindLogMsg ("could not read CFA value for first frame.");
+ m_frame_type = eNotAValidFrame;
+ return;
+ }
}
UnwindLogMsg ("initialized frame current pc is 0x%" PRIx64 " cfa is 0x%" PRIx64 " using %s UnwindPlan",
OpenPOWER on IntegriCloud