@@ -3641,78 +3641,85 @@ class CommandObjectTargetModulesShowUnwind : public CommandObjectParsed {
36413641
36423642 result.GetOutputStream ().Printf (" \n " );
36433643
3644- if (std::shared_ptr<const UnwindPlan> plan_sp =
3645- func_unwinders_sp->GetUnwindPlanAtNonCallSite (*target, *thread)) {
3644+ UnwindPlanSP non_callsite_unwind_plan =
3645+ func_unwinders_sp->GetUnwindPlanAtNonCallSite (*target, *thread);
3646+ if (non_callsite_unwind_plan) {
36463647 result.GetOutputStream ().Printf (
36473648 " Asynchronous (not restricted to call-sites) UnwindPlan is '%s'\n " ,
3648- plan_sp ->GetSourceName ().AsCString ());
3649+ non_callsite_unwind_plan ->GetSourceName ().AsCString ());
36493650 }
3650- if (std::shared_ptr<const UnwindPlan> plan_sp =
3651- func_unwinders_sp->GetUnwindPlanAtCallSite (*target, *thread)) {
3651+ UnwindPlanSP callsite_unwind_plan =
3652+ func_unwinders_sp->GetUnwindPlanAtCallSite (*target, *thread);
3653+ if (callsite_unwind_plan) {
36523654 result.GetOutputStream ().Printf (
36533655 " Synchronous (restricted to call-sites) UnwindPlan is '%s'\n " ,
3654- plan_sp ->GetSourceName ().AsCString ());
3656+ callsite_unwind_plan ->GetSourceName ().AsCString ());
36553657 }
3656- if (std::shared_ptr<const UnwindPlan> plan_sp =
3657- func_unwinders_sp->GetUnwindPlanFastUnwind (*target, *thread)) {
3658- result.GetOutputStream ().Printf (" Fast UnwindPlan is '%s'\n " ,
3659- plan_sp->GetSourceName ().AsCString ());
3658+ UnwindPlanSP fast_unwind_plan =
3659+ func_unwinders_sp->GetUnwindPlanFastUnwind (*target, *thread);
3660+ if (fast_unwind_plan) {
3661+ result.GetOutputStream ().Printf (
3662+ " Fast UnwindPlan is '%s'\n " ,
3663+ fast_unwind_plan->GetSourceName ().AsCString ());
36603664 }
36613665
36623666 result.GetOutputStream ().Printf (" \n " );
36633667
3664- if (std::shared_ptr<const UnwindPlan> plan_sp =
3665- func_unwinders_sp->GetAssemblyUnwindPlan (*target, *thread)) {
3668+ UnwindPlanSP assembly_sp =
3669+ func_unwinders_sp->GetAssemblyUnwindPlan (*target, *thread);
3670+ if (assembly_sp) {
36663671 result.GetOutputStream ().Printf (
36673672 " Assembly language inspection UnwindPlan:\n " );
3668- plan_sp ->Dump (result.GetOutputStream (), thread.get (),
3669- LLDB_INVALID_ADDRESS);
3673+ assembly_sp ->Dump (result.GetOutputStream (), thread.get (),
3674+ LLDB_INVALID_ADDRESS);
36703675 result.GetOutputStream ().Printf (" \n " );
36713676 }
36723677
3673- if (std::shared_ptr<const UnwindPlan> plan_sp =
3674- func_unwinders_sp->GetObjectFileUnwindPlan (*target)) {
3678+ UnwindPlanSP of_unwind_sp =
3679+ func_unwinders_sp->GetObjectFileUnwindPlan (*target);
3680+ if (of_unwind_sp) {
36753681 result.GetOutputStream ().Printf (" object file UnwindPlan:\n " );
3676- plan_sp ->Dump (result.GetOutputStream (), thread.get (),
3677- LLDB_INVALID_ADDRESS);
3682+ of_unwind_sp ->Dump (result.GetOutputStream (), thread.get (),
3683+ LLDB_INVALID_ADDRESS);
36783684 result.GetOutputStream ().Printf (" \n " );
36793685 }
36803686
3681- if (std::shared_ptr< const UnwindPlan> plan_sp =
3682- func_unwinders_sp->GetObjectFileAugmentedUnwindPlan (*target,
3683- *thread) ) {
3687+ UnwindPlanSP of_unwind_augmented_sp =
3688+ func_unwinders_sp->GetObjectFileAugmentedUnwindPlan (*target, *thread);
3689+ if (of_unwind_augmented_sp ) {
36843690 result.GetOutputStream ().Printf (" object file augmented UnwindPlan:\n " );
3685- plan_sp ->Dump (result.GetOutputStream (), thread.get (),
3686- LLDB_INVALID_ADDRESS);
3691+ of_unwind_augmented_sp ->Dump (result.GetOutputStream (), thread.get (),
3692+ LLDB_INVALID_ADDRESS);
36873693 result.GetOutputStream ().Printf (" \n " );
36883694 }
36893695
3690- if (std::shared_ptr<const UnwindPlan> plan_sp =
3691- func_unwinders_sp->GetEHFrameUnwindPlan (*target)) {
3696+ UnwindPlanSP ehframe_sp =
3697+ func_unwinders_sp->GetEHFrameUnwindPlan (*target);
3698+ if (ehframe_sp) {
36923699 result.GetOutputStream ().Printf (" eh_frame UnwindPlan:\n " );
3693- plan_sp ->Dump (result.GetOutputStream (), thread.get (),
3694- LLDB_INVALID_ADDRESS);
3700+ ehframe_sp ->Dump (result.GetOutputStream (), thread.get (),
3701+ LLDB_INVALID_ADDRESS);
36953702 result.GetOutputStream ().Printf (" \n " );
36963703 }
36973704
3698- if (std::shared_ptr< const UnwindPlan> plan_sp =
3699- func_unwinders_sp->GetEHFrameAugmentedUnwindPlan (*target,
3700- *thread) ) {
3705+ UnwindPlanSP ehframe_augmented_sp =
3706+ func_unwinders_sp->GetEHFrameAugmentedUnwindPlan (*target, *thread);
3707+ if (ehframe_augmented_sp ) {
37013708 result.GetOutputStream ().Printf (" eh_frame augmented UnwindPlan:\n " );
3702- plan_sp ->Dump (result.GetOutputStream (), thread.get (),
3703- LLDB_INVALID_ADDRESS);
3709+ ehframe_augmented_sp ->Dump (result.GetOutputStream (), thread.get (),
3710+ LLDB_INVALID_ADDRESS);
37043711 result.GetOutputStream ().Printf (" \n " );
37053712 }
37063713
3707- if (std::shared_ptr< const UnwindPlan> plan_sp =
3714+ if (UnwindPlanSP plan_sp =
37083715 func_unwinders_sp->GetDebugFrameUnwindPlan (*target)) {
37093716 result.GetOutputStream ().Printf (" debug_frame UnwindPlan:\n " );
37103717 plan_sp->Dump (result.GetOutputStream (), thread.get (),
37113718 LLDB_INVALID_ADDRESS);
37123719 result.GetOutputStream ().Printf (" \n " );
37133720 }
37143721
3715- if (std::shared_ptr< const UnwindPlan> plan_sp =
3722+ if (UnwindPlanSP plan_sp =
37163723 func_unwinders_sp->GetDebugFrameAugmentedUnwindPlan (*target,
37173724 *thread)) {
37183725 result.GetOutputStream ().Printf (" debug_frame augmented UnwindPlan:\n " );
@@ -3721,35 +3728,36 @@ class CommandObjectTargetModulesShowUnwind : public CommandObjectParsed {
37213728 result.GetOutputStream ().Printf (" \n " );
37223729 }
37233730
3724- if (std::shared_ptr<const UnwindPlan> plan_sp =
3725- func_unwinders_sp->GetArmUnwindUnwindPlan (*target)) {
3731+ UnwindPlanSP arm_unwind_sp =
3732+ func_unwinders_sp->GetArmUnwindUnwindPlan (*target);
3733+ if (arm_unwind_sp) {
37263734 result.GetOutputStream ().Printf (" ARM.exidx unwind UnwindPlan:\n " );
3727- plan_sp ->Dump (result.GetOutputStream (), thread.get (),
3728- LLDB_INVALID_ADDRESS);
3735+ arm_unwind_sp ->Dump (result.GetOutputStream (), thread.get (),
3736+ LLDB_INVALID_ADDRESS);
37293737 result.GetOutputStream ().Printf (" \n " );
37303738 }
37313739
3732- if (std::shared_ptr< const UnwindPlan> plan_sp =
3740+ if (UnwindPlanSP symfile_plan_sp =
37333741 func_unwinders_sp->GetSymbolFileUnwindPlan (*thread)) {
37343742 result.GetOutputStream ().Printf (" Symbol file UnwindPlan:\n " );
3735- plan_sp ->Dump (result.GetOutputStream (), thread.get (),
3736- LLDB_INVALID_ADDRESS);
3743+ symfile_plan_sp ->Dump (result.GetOutputStream (), thread.get (),
3744+ LLDB_INVALID_ADDRESS);
37373745 result.GetOutputStream ().Printf (" \n " );
37383746 }
37393747
3740- if (std::shared_ptr<const UnwindPlan> plan_sp =
3741- func_unwinders_sp->GetCompactUnwindUnwindPlan (*target)) {
3748+ UnwindPlanSP compact_unwind_sp =
3749+ func_unwinders_sp->GetCompactUnwindUnwindPlan (*target);
3750+ if (compact_unwind_sp) {
37423751 result.GetOutputStream ().Printf (" Compact unwind UnwindPlan:\n " );
3743- plan_sp ->Dump (result.GetOutputStream (), thread.get (),
3744- LLDB_INVALID_ADDRESS);
3752+ compact_unwind_sp ->Dump (result.GetOutputStream (), thread.get (),
3753+ LLDB_INVALID_ADDRESS);
37453754 result.GetOutputStream ().Printf (" \n " );
37463755 }
37473756
3748- if (std::shared_ptr<const UnwindPlan> plan_sp =
3749- func_unwinders_sp->GetUnwindPlanFastUnwind (*target, *thread)) {
3757+ if (fast_unwind_plan) {
37503758 result.GetOutputStream ().Printf (" Fast UnwindPlan:\n " );
3751- plan_sp ->Dump (result.GetOutputStream (), thread.get (),
3752- LLDB_INVALID_ADDRESS);
3759+ fast_unwind_plan ->Dump (result.GetOutputStream (), thread.get (),
3760+ LLDB_INVALID_ADDRESS);
37533761 result.GetOutputStream ().Printf (" \n " );
37543762 }
37553763
0 commit comments