summaryrefslogtreecommitdiffstats
path: root/lldb/source/Symbol/DWARFCallFrameInfo.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/DWARFCallFrameInfo.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/DWARFCallFrameInfo.cpp')
-rw-r--r--lldb/source/Symbol/DWARFCallFrameInfo.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lldb/source/Symbol/DWARFCallFrameInfo.cpp b/lldb/source/Symbol/DWARFCallFrameInfo.cpp
index 5bd5dd50f75..7dbd7117a09 100644
--- a/lldb/source/Symbol/DWARFCallFrameInfo.cpp
+++ b/lldb/source/Symbol/DWARFCallFrameInfo.cpp
@@ -371,11 +371,18 @@ DWARFCallFrameInfo::FDEToUnwindPlan (dw_offset_t offset, Address startaddr, Unwi
{
unwind_plan.SetSourceName ("eh_frame CFI");
cie_offset = current_entry + 4 - cie_offset;
+ unwind_plan.SetUnwindPlanValidAtAllInstructions (eLazyBoolNo);
}
else
{
unwind_plan.SetSourceName ("DWARF CFI");
+ // In theory the debug_frame info should be valid at all call sites
+ // ("asynchronous unwind info" as it is sometimes called) but in practice
+ // gcc et al all emit call frame info for the prologue and call sites, but
+ // not for the epilogue or all the other locations during the function reliably.
+ unwind_plan.SetUnwindPlanValidAtAllInstructions (eLazyBoolNo);
}
+ unwind_plan.SetSourcedFromCompiler (eLazyBoolYes);
const CIE *cie = GetCIE (cie_offset);
assert (cie != NULL);
OpenPOWER on IntegriCloud