summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2015-01-21 01:26:28 +0000
committerJason Molenda <jmolenda@apple.com>2015-01-21 01:26:28 +0000
commite527c5810ca929c6e22a7c11efbdd5022f75e690 (patch)
tree7792db6e49660c2cfd8ed6a5c83a7885a05082ef /lldb/source/Plugins/Process
parent8c9cdb657302122a5ae35e4a8bdc972a6f6fab48 (diff)
downloadbcm5719-llvm-e527c5810ca929c6e22a7c11efbdd5022f75e690.tar.gz
bcm5719-llvm-e527c5810ca929c6e22a7c11efbdd5022f75e690.zip
Adding compact unwind as a source of unwind information
introduced subtle bugs in two places in RegisterContextLLDB::GetFullUnwindPlanForFrame where it specifically wanted to get an eh_frame unwind plan and was using "Get CallSite UnwindPlan" as synonymous with that. But now we have two different types of unwind plan that can be returned in that case, and compact unwind won't behaves as needed. <rdar://problem/19528559> llvm-svn: 226631
Diffstat (limited to 'lldb/source/Plugins/Process')
-rw-r--r--lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
index f47d687702e..1b3a9491d1c 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
@@ -811,7 +811,7 @@ RegisterContextLLDB::GetFullUnwindPlanForFrame ()
if (m_frame_type == eTrapHandlerFrame && process)
{
m_fast_unwind_plan_sp.reset();
- unwind_plan_sp = func_unwinders_sp->GetUnwindPlanAtCallSite (process->GetTarget(), m_current_offset_backed_up_one);
+ unwind_plan_sp = func_unwinders_sp->GetEHFrameUnwindPlan (process->GetTarget(), m_current_offset_backed_up_one);
if (unwind_plan_sp && unwind_plan_sp->PlanValidAtAddress (m_current_pc) && unwind_plan_sp->GetSourcedFromCompiler() == eLazyBoolYes)
{
return unwind_plan_sp;
@@ -826,7 +826,10 @@ RegisterContextLLDB::GetFullUnwindPlanForFrame ()
// But there is not.
if (process && process->GetDynamicLoader() && process->GetDynamicLoader()->AlwaysRelyOnEHUnwindInfo (m_sym_ctx))
{
- unwind_plan_sp = func_unwinders_sp->GetUnwindPlanAtCallSite (process->GetTarget(), m_current_offset_backed_up_one);
+ // We must specifically call the GetEHFrameUnwindPlan() method here -- normally we would
+ // call GetUnwindPlanAtCallSite() -- because CallSite may return an unwind plan sourced from
+ // either eh_frame (that's what we intend) or compact unwind (this won't work)
+ unwind_plan_sp = func_unwinders_sp->GetEHFrameUnwindPlan (process->GetTarget(), m_current_offset_backed_up_one);
if (unwind_plan_sp && unwind_plan_sp->PlanValidAtAddress (m_current_pc))
{
UnwindLogMsgVerbose ("frame uses %s for full UnwindPlan because the DynamicLoader suggested we prefer it",
OpenPOWER on IntegriCloud