Copy unwind plan instead of modifying it directly, so "image show-unwind" prints different plans for asynchronous and synchronous.

Change by Tong Shen.

llvm-svn: 216416
This commit is contained in:
Todd Fiala 2014-08-25 23:09:40 +00:00
parent 42036ae034
commit a220946990
1 changed files with 7 additions and 3 deletions

View File

@ -121,9 +121,13 @@ FuncUnwinders::GetUnwindPlanAtNonCallSite (Target& target, Thread& thread, int c
// For 0th frame on i386 & x86_64, we fetch eh_frame and try using assembly profiler
// to augment it into asynchronous unwind table.
GetUnwindPlanAtCallSite(current_offset);
if (m_unwind_plan_call_site_sp
&& assembly_profiler_sp->AugmentUnwindPlanFromCallSite(m_range, thread, *m_unwind_plan_call_site_sp))
return m_unwind_plan_call_site_sp;
if (m_unwind_plan_call_site_sp) {
UnwindPlan* plan = new UnwindPlan (*m_unwind_plan_call_site_sp);
if (assembly_profiler_sp->AugmentUnwindPlanFromCallSite (m_range, thread, *plan)) {
m_unwind_plan_non_call_site_sp.reset (plan);
return m_unwind_plan_non_call_site_sp;
}
}
}
m_unwind_plan_non_call_site_sp.reset (new UnwindPlan (lldb::eRegisterKindGeneric));