diff options
author | Jason Molenda <jmolenda@apple.com> | 2014-08-25 22:16:23 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2014-08-25 22:16:23 +0000 |
commit | 1786ebf3d43bd801b59f9a85b5fc44b2f462b576 (patch) | |
tree | 2ac387eb7ce4b72f4696605da081b3212f6d379e /lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp | |
parent | f7c3a1d25652efb02e73f5fb708788678540a776 (diff) | |
download | bcm5719-llvm-1786ebf3d43bd801b59f9a85b5fc44b2f462b576.tar.gz bcm5719-llvm-1786ebf3d43bd801b59f9a85b5fc44b2f462b576.zip |
Have augment_unwind_plan_from_call_site update the UnwindPlan
name/from-compiler settings to indicate that it was augmented
by assembly profiling.
llvm-svn: 216412
Diffstat (limited to 'lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp')
-rw-r--r-- | lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp b/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp index d1836bf622f..78a4c192004 100644 --- a/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp +++ b/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp @@ -876,6 +876,7 @@ AssemblyParse_x86::augment_unwind_plan_from_call_site (AddressRange& func, Unwin m_cur_insn = func.GetBaseAddress(); uint64_t offset = 0; int row_id = 1; + bool unwind_plan_updated = false; UnwindPlan::RowSP row(new UnwindPlan::Row(*first_row)); while (func.ContainsFileAddress (m_cur_insn)) { @@ -935,6 +936,7 @@ AssemblyParse_x86::augment_unwind_plan_from_call_site (AddressRange& func, Unwin UnwindPlan::RowSP new_row(new UnwindPlan::Row(*row)); unwind_plan.InsertRow (new_row); + unwind_plan_updated = true; continue; } @@ -946,6 +948,7 @@ AssemblyParse_x86::augment_unwind_plan_from_call_site (AddressRange& func, Unwin UnwindPlan::RowSP new_row(new UnwindPlan::Row(*row)); unwind_plan.InsertRow (new_row); + unwind_plan_updated = true; continue; } if (pop_reg_p (regno)) { @@ -959,6 +962,7 @@ AssemblyParse_x86::augment_unwind_plan_from_call_site (AddressRange& func, Unwin UnwindPlan::RowSP new_row(new UnwindPlan::Row(*row)); unwind_plan.InsertRow (new_row); + unwind_plan_updated = true; continue; } @@ -968,6 +972,7 @@ AssemblyParse_x86::augment_unwind_plan_from_call_site (AddressRange& func, Unwin row->SetCFAOffset (m_wordsize + row->GetCFAOffset()); UnwindPlan::RowSP new_row(new UnwindPlan::Row(*row)); unwind_plan.InsertRow (new_row); + unwind_plan_updated = true; continue; } @@ -979,6 +984,7 @@ AssemblyParse_x86::augment_unwind_plan_from_call_site (AddressRange& func, Unwin UnwindPlan::RowSP new_row(new UnwindPlan::Row(*row)); unwind_plan.InsertRow (new_row); + unwind_plan_updated = true; continue; } if (sub_rsp_pattern_p (amount)) { @@ -987,6 +993,7 @@ AssemblyParse_x86::augment_unwind_plan_from_call_site (AddressRange& func, Unwin UnwindPlan::RowSP new_row(new UnwindPlan::Row(*row)); unwind_plan.InsertRow (new_row); + unwind_plan_updated = true; continue; } } @@ -1009,6 +1016,7 @@ AssemblyParse_x86::augment_unwind_plan_from_call_site (AddressRange& func, Unwin UnwindPlan::RowSP new_row(new UnwindPlan::Row(*row)); unwind_plan.InsertRow (new_row); + unwind_plan_updated = true; continue; } } @@ -1024,6 +1032,13 @@ AssemblyParse_x86::augment_unwind_plan_from_call_site (AddressRange& func, Unwin } unwind_plan.SetPlanValidAddressRange (func); + if (unwind_plan_updated) + { + std::string unwind_plan_source (unwind_plan.GetSourceName().AsCString()); + unwind_plan_source += " plus augmentation from assembly parsing"; + unwind_plan.SetSourceName (unwind_plan_source.c_str()); + unwind_plan.SetSourcedFromCompiler (eLazyBoolNo); + } return true; } |