summaryrefslogtreecommitdiffstats
path: root/lldb/source/Symbol/FuncUnwinders.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2012-10-26 06:08:58 +0000
committerJason Molenda <jmolenda@apple.com>2012-10-26 06:08:58 +0000
commit60f0bd4944ab958894005ddc1f0016bfe67c505a (patch)
tree493196dac742a4a58db52f288593628bb47c559c /lldb/source/Symbol/FuncUnwinders.cpp
parent287f0449a213ea4f88ca3389edb53cde429783d8 (diff)
downloadbcm5719-llvm-60f0bd4944ab958894005ddc1f0016bfe67c505a.tar.gz
bcm5719-llvm-60f0bd4944ab958894005ddc1f0016bfe67c505a.zip
Add a new capability to RegisterContextLLDB: To recognize when the
Full UnwindPlan is trying to do an impossible unwind; in that case invalidate the Full UnwindPlan and replace it with the architecture default unwind plan. This is a scenario that happens occasionally with arm unwinds in particular; the instruction analysis based full unwindplan can mis-parse the functions and the stack walk stops prematurely. Now we can do a simpleminded frame-chain walk to find the caller frame and continue the unwind. It's not ideal but given the complicated nature of analyzing the arm functions, and the lack of eh_frame information on iOS, it is a distinct improvement and fixes some long-standing problems with the unwinder on that platform. This is fixing <rdar://problem/12091421>. I may re-use this invalidate feature in the future if I can identify other cases where the full unwindplan's unwind information is clearly incorrect. This checkin also includes some cleanup for the volatile register definition in the arm ABI plugin for <rdar://problem/10652166> although work remains to be done for that bug. llvm-svn: 166757
Diffstat (limited to 'lldb/source/Symbol/FuncUnwinders.cpp')
-rw-r--r--lldb/source/Symbol/FuncUnwinders.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/Symbol/FuncUnwinders.cpp b/lldb/source/Symbol/FuncUnwinders.cpp
index 616bd614bad..07b2144e528 100644
--- a/lldb/source/Symbol/FuncUnwinders.cpp
+++ b/lldb/source/Symbol/FuncUnwinders.cpp
@@ -236,3 +236,12 @@ FuncUnwinders::GetFunctionStartAddress () const
return m_range.GetBaseAddress();
}
+void
+FuncUnwinders::InvalidateNonCallSiteUnwindPlan (lldb_private::Thread& thread)
+{
+ UnwindPlanSP arch_default = GetUnwindPlanArchitectureDefault (thread);
+ if (arch_default && m_tried_unwind_at_call_site)
+ {
+ m_unwind_plan_call_site_sp = arch_default;
+ }
+}
OpenPOWER on IntegriCloud