diff options
author | Vladislav Dzhidzhoev <vdzhidzhoev@accesssoftek.com> | 2025-04-03 11:33:11 +0200 |
---|---|---|
committer | Vladislav Dzhidzhoev <vdzhidzhoev@accesssoftek.com> | 2025-04-03 11:33:11 +0200 |
commit | 094904303d50e0ab14bc5f2586a602f79af95953 (patch) | |
tree | 579f492769247db84614ca863fd181f31ab14792 /lldb/source/Commands/CommandObjectTarget.cpp | |
parent | 6f324bd39b98659c81aae02595cee1b4c92db8e9 (diff) | |
download | llvm-094904303d50e0ab14bc5f2586a602f79af95953.zip llvm-094904303d50e0ab14bc5f2586a602f79af95953.tar.gz llvm-094904303d50e0ab14bc5f2586a602f79af95953.tar.bz2 |
Revert "[lldb] Return *const* UnwindPlan pointers from FuncUnwinders (#133247)"
This reverts commit d7afafdbc464e65c56a0a1d77bad426aa7538306.
Caused remote Linux to Linux buildbot failure
https://lab.llvm.org/buildbot/#/builders/195/builds/7046.
Diffstat (limited to 'lldb/source/Commands/CommandObjectTarget.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectTarget.cpp | 106 |
1 files changed, 57 insertions, 49 deletions
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp index 3f7d300..c77bddb 100644 --- a/lldb/source/Commands/CommandObjectTarget.cpp +++ b/lldb/source/Commands/CommandObjectTarget.cpp @@ -3641,70 +3641,77 @@ protected: result.GetOutputStream().Printf("\n"); - if (std::shared_ptr<const UnwindPlan> plan_sp = - func_unwinders_sp->GetUnwindPlanAtNonCallSite(*target, *thread)) { + UnwindPlanSP non_callsite_unwind_plan = + func_unwinders_sp->GetUnwindPlanAtNonCallSite(*target, *thread); + if (non_callsite_unwind_plan) { result.GetOutputStream().Printf( "Asynchronous (not restricted to call-sites) UnwindPlan is '%s'\n", - plan_sp->GetSourceName().AsCString()); + non_callsite_unwind_plan->GetSourceName().AsCString()); } - if (std::shared_ptr<const UnwindPlan> plan_sp = - func_unwinders_sp->GetUnwindPlanAtCallSite(*target, *thread)) { + UnwindPlanSP callsite_unwind_plan = + func_unwinders_sp->GetUnwindPlanAtCallSite(*target, *thread); + if (callsite_unwind_plan) { result.GetOutputStream().Printf( "Synchronous (restricted to call-sites) UnwindPlan is '%s'\n", - plan_sp->GetSourceName().AsCString()); + callsite_unwind_plan->GetSourceName().AsCString()); } - if (std::shared_ptr<const UnwindPlan> plan_sp = - func_unwinders_sp->GetUnwindPlanFastUnwind(*target, *thread)) { - result.GetOutputStream().Printf("Fast UnwindPlan is '%s'\n", - plan_sp->GetSourceName().AsCString()); + UnwindPlanSP fast_unwind_plan = + func_unwinders_sp->GetUnwindPlanFastUnwind(*target, *thread); + if (fast_unwind_plan) { + result.GetOutputStream().Printf( + "Fast UnwindPlan is '%s'\n", + fast_unwind_plan->GetSourceName().AsCString()); } result.GetOutputStream().Printf("\n"); - if (std::shared_ptr<const UnwindPlan> plan_sp = - func_unwinders_sp->GetAssemblyUnwindPlan(*target, *thread)) { + UnwindPlanSP assembly_sp = + func_unwinders_sp->GetAssemblyUnwindPlan(*target, *thread); + if (assembly_sp) { result.GetOutputStream().Printf( "Assembly language inspection UnwindPlan:\n"); - plan_sp->Dump(result.GetOutputStream(), thread.get(), - LLDB_INVALID_ADDRESS); + assembly_sp->Dump(result.GetOutputStream(), thread.get(), + LLDB_INVALID_ADDRESS); result.GetOutputStream().Printf("\n"); } - if (std::shared_ptr<const UnwindPlan> plan_sp = - func_unwinders_sp->GetObjectFileUnwindPlan(*target)) { + UnwindPlanSP of_unwind_sp = + func_unwinders_sp->GetObjectFileUnwindPlan(*target); + if (of_unwind_sp) { result.GetOutputStream().Printf("object file UnwindPlan:\n"); - plan_sp->Dump(result.GetOutputStream(), thread.get(), - LLDB_INVALID_ADDRESS); + of_unwind_sp->Dump(result.GetOutputStream(), thread.get(), + LLDB_INVALID_ADDRESS); result.GetOutputStream().Printf("\n"); } - if (std::shared_ptr<const UnwindPlan> plan_sp = - func_unwinders_sp->GetObjectFileAugmentedUnwindPlan(*target, - *thread)) { + UnwindPlanSP of_unwind_augmented_sp = + func_unwinders_sp->GetObjectFileAugmentedUnwindPlan(*target, *thread); + if (of_unwind_augmented_sp) { result.GetOutputStream().Printf("object file augmented UnwindPlan:\n"); - plan_sp->Dump(result.GetOutputStream(), thread.get(), - LLDB_INVALID_ADDRESS); + of_unwind_augmented_sp->Dump(result.GetOutputStream(), thread.get(), + LLDB_INVALID_ADDRESS); result.GetOutputStream().Printf("\n"); } - if (std::shared_ptr<const UnwindPlan> plan_sp = - func_unwinders_sp->GetEHFrameUnwindPlan(*target)) { + UnwindPlanSP ehframe_sp = + func_unwinders_sp->GetEHFrameUnwindPlan(*target); + if (ehframe_sp) { result.GetOutputStream().Printf("eh_frame UnwindPlan:\n"); - plan_sp->Dump(result.GetOutputStream(), thread.get(), - LLDB_INVALID_ADDRESS); + ehframe_sp->Dump(result.GetOutputStream(), thread.get(), + LLDB_INVALID_ADDRESS); result.GetOutputStream().Printf("\n"); } - if (std::shared_ptr<const UnwindPlan> plan_sp = - func_unwinders_sp->GetEHFrameAugmentedUnwindPlan(*target, - *thread)) { + UnwindPlanSP ehframe_augmented_sp = + func_unwinders_sp->GetEHFrameAugmentedUnwindPlan(*target, *thread); + if (ehframe_augmented_sp) { result.GetOutputStream().Printf("eh_frame augmented UnwindPlan:\n"); - plan_sp->Dump(result.GetOutputStream(), thread.get(), - LLDB_INVALID_ADDRESS); + ehframe_augmented_sp->Dump(result.GetOutputStream(), thread.get(), + LLDB_INVALID_ADDRESS); result.GetOutputStream().Printf("\n"); } - if (std::shared_ptr<const UnwindPlan> plan_sp = + if (UnwindPlanSP plan_sp = func_unwinders_sp->GetDebugFrameUnwindPlan(*target)) { result.GetOutputStream().Printf("debug_frame UnwindPlan:\n"); plan_sp->Dump(result.GetOutputStream(), thread.get(), @@ -3712,7 +3719,7 @@ protected: result.GetOutputStream().Printf("\n"); } - if (std::shared_ptr<const UnwindPlan> plan_sp = + if (UnwindPlanSP plan_sp = func_unwinders_sp->GetDebugFrameAugmentedUnwindPlan(*target, *thread)) { result.GetOutputStream().Printf("debug_frame augmented UnwindPlan:\n"); @@ -3721,35 +3728,36 @@ protected: result.GetOutputStream().Printf("\n"); } - if (std::shared_ptr<const UnwindPlan> plan_sp = - func_unwinders_sp->GetArmUnwindUnwindPlan(*target)) { + UnwindPlanSP arm_unwind_sp = + func_unwinders_sp->GetArmUnwindUnwindPlan(*target); + if (arm_unwind_sp) { result.GetOutputStream().Printf("ARM.exidx unwind UnwindPlan:\n"); - plan_sp->Dump(result.GetOutputStream(), thread.get(), - LLDB_INVALID_ADDRESS); + arm_unwind_sp->Dump(result.GetOutputStream(), thread.get(), + LLDB_INVALID_ADDRESS); result.GetOutputStream().Printf("\n"); } - if (std::shared_ptr<const UnwindPlan> plan_sp = + if (UnwindPlanSP symfile_plan_sp = func_unwinders_sp->GetSymbolFileUnwindPlan(*thread)) { result.GetOutputStream().Printf("Symbol file UnwindPlan:\n"); - plan_sp->Dump(result.GetOutputStream(), thread.get(), - LLDB_INVALID_ADDRESS); + symfile_plan_sp->Dump(result.GetOutputStream(), thread.get(), + LLDB_INVALID_ADDRESS); result.GetOutputStream().Printf("\n"); } - if (std::shared_ptr<const UnwindPlan> plan_sp = - func_unwinders_sp->GetCompactUnwindUnwindPlan(*target)) { + UnwindPlanSP compact_unwind_sp = + func_unwinders_sp->GetCompactUnwindUnwindPlan(*target); + if (compact_unwind_sp) { result.GetOutputStream().Printf("Compact unwind UnwindPlan:\n"); - plan_sp->Dump(result.GetOutputStream(), thread.get(), - LLDB_INVALID_ADDRESS); + compact_unwind_sp->Dump(result.GetOutputStream(), thread.get(), + LLDB_INVALID_ADDRESS); result.GetOutputStream().Printf("\n"); } - if (std::shared_ptr<const UnwindPlan> plan_sp = - func_unwinders_sp->GetUnwindPlanFastUnwind(*target, *thread)) { + if (fast_unwind_plan) { result.GetOutputStream().Printf("Fast UnwindPlan:\n"); - plan_sp->Dump(result.GetOutputStream(), thread.get(), - LLDB_INVALID_ADDRESS); + fast_unwind_plan->Dump(result.GetOutputStream(), thread.get(), + LLDB_INVALID_ADDRESS); result.GetOutputStream().Printf("\n"); } |