Add a new capability to RegisterContextLLDB: To recognize when the
authorJason Molenda <jmolenda@apple.com>
Fri, 26 Oct 2012 06:08:58 +0000 (06:08 +0000)
committerJason Molenda <jmolenda@apple.com>
Fri, 26 Oct 2012 06:08:58 +0000 (06:08 +0000)
commit60f0bd4944ab958894005ddc1f0016bfe67c505a
tree493196dac742a4a58db52f288593628bb47c559c
parent287f0449a213ea4f88ca3389edb53cde429783d8
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
14 files changed:
lldb/include/lldb/Symbol/FuncUnwinders.h
lldb/include/lldb/Symbol/UnwindPlan.h
lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp
lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp
lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
lldb/source/Plugins/Process/Utility/RegisterContextLLDB.h
lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp
lldb/source/Plugins/Process/Utility/UnwindLLDB.h
lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
lldb/source/Symbol/DWARFCallFrameInfo.cpp
lldb/source/Symbol/FuncUnwinders.cpp
lldb/source/Symbol/UnwindPlan.cpp