@@ -3641,85 +3641,78 @@ class CommandObjectTargetModulesShowUnwind : public CommandObjectParsed {
36413641
36423642 result.GetOutputStream ().Printf (" \n " );
36433643
3644- UnwindPlanSP non_callsite_unwind_plan =
3645- func_unwinders_sp->GetUnwindPlanAtNonCallSite (*target, *thread);
3646- if (non_callsite_unwind_plan) {
3644+ if (std::shared_ptr<const UnwindPlan> plan_sp =
3645+ func_unwinders_sp->GetUnwindPlanAtNonCallSite (*target, *thread)) {
36473646 result.GetOutputStream ().Printf (
36483647 " Asynchronous (not restricted to call-sites) UnwindPlan is '%s'\n " ,
3649- non_callsite_unwind_plan ->GetSourceName ().AsCString ());
3648+ plan_sp ->GetSourceName ().AsCString ());
36503649 }
3651- UnwindPlanSP callsite_unwind_plan =
3652- func_unwinders_sp->GetUnwindPlanAtCallSite (*target, *thread);
3653- if (callsite_unwind_plan) {
3650+ if (std::shared_ptr<const UnwindPlan> plan_sp =
3651+ func_unwinders_sp->GetUnwindPlanAtCallSite (*target, *thread)) {
36543652 result.GetOutputStream ().Printf (
36553653 " Synchronous (restricted to call-sites) UnwindPlan is '%s'\n " ,
3656- callsite_unwind_plan ->GetSourceName ().AsCString ());
3654+ plan_sp ->GetSourceName ().AsCString ());
36573655 }
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 ());
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 ());
36643660 }
36653661
36663662 result.GetOutputStream ().Printf (" \n " );
36673663
3668- UnwindPlanSP assembly_sp =
3669- func_unwinders_sp->GetAssemblyUnwindPlan (*target, *thread);
3670- if (assembly_sp) {
3664+ if (std::shared_ptr<const UnwindPlan> plan_sp =
3665+ func_unwinders_sp->GetAssemblyUnwindPlan (*target, *thread)) {
36713666 result.GetOutputStream ().Printf (
36723667 " Assembly language inspection UnwindPlan:\n " );
3673- assembly_sp ->Dump (result.GetOutputStream (), thread.get (),
3674- LLDB_INVALID_ADDRESS);
3668+ plan_sp ->Dump (result.GetOutputStream (), thread.get (),
3669+ LLDB_INVALID_ADDRESS);
36753670 result.GetOutputStream ().Printf (" \n " );
36763671 }
36773672
3678- UnwindPlanSP of_unwind_sp =
3679- func_unwinders_sp->GetObjectFileUnwindPlan (*target);
3680- if (of_unwind_sp) {
3673+ if (std::shared_ptr<const UnwindPlan> plan_sp =
3674+ func_unwinders_sp->GetObjectFileUnwindPlan (*target)) {
36813675 result.GetOutputStream ().Printf (" object file UnwindPlan:\n " );
3682- of_unwind_sp ->Dump (result.GetOutputStream (), thread.get (),
3683- LLDB_INVALID_ADDRESS);
3676+ plan_sp ->Dump (result.GetOutputStream (), thread.get (),
3677+ LLDB_INVALID_ADDRESS);
36843678 result.GetOutputStream ().Printf (" \n " );
36853679 }
36863680
3687- UnwindPlanSP of_unwind_augmented_sp =
3688- func_unwinders_sp->GetObjectFileAugmentedUnwindPlan (*target, *thread);
3689- if (of_unwind_augmented_sp ) {
3681+ if (std::shared_ptr< const UnwindPlan> plan_sp =
3682+ func_unwinders_sp->GetObjectFileAugmentedUnwindPlan (*target,
3683+ *thread) ) {
36903684 result.GetOutputStream ().Printf (" object file augmented UnwindPlan:\n " );
3691- of_unwind_augmented_sp ->Dump (result.GetOutputStream (), thread.get (),
3692- LLDB_INVALID_ADDRESS);
3685+ plan_sp ->Dump (result.GetOutputStream (), thread.get (),
3686+ LLDB_INVALID_ADDRESS);
36933687 result.GetOutputStream ().Printf (" \n " );
36943688 }
36953689
3696- UnwindPlanSP ehframe_sp =
3697- func_unwinders_sp->GetEHFrameUnwindPlan (*target);
3698- if (ehframe_sp) {
3690+ if (std::shared_ptr<const UnwindPlan> plan_sp =
3691+ func_unwinders_sp->GetEHFrameUnwindPlan (*target)) {
36993692 result.GetOutputStream ().Printf (" eh_frame UnwindPlan:\n " );
3700- ehframe_sp ->Dump (result.GetOutputStream (), thread.get (),
3701- LLDB_INVALID_ADDRESS);
3693+ plan_sp ->Dump (result.GetOutputStream (), thread.get (),
3694+ LLDB_INVALID_ADDRESS);
37023695 result.GetOutputStream ().Printf (" \n " );
37033696 }
37043697
3705- UnwindPlanSP ehframe_augmented_sp =
3706- func_unwinders_sp->GetEHFrameAugmentedUnwindPlan (*target, *thread);
3707- if (ehframe_augmented_sp ) {
3698+ if (std::shared_ptr< const UnwindPlan> plan_sp =
3699+ func_unwinders_sp->GetEHFrameAugmentedUnwindPlan (*target,
3700+ *thread) ) {
37083701 result.GetOutputStream ().Printf (" eh_frame augmented UnwindPlan:\n " );
3709- ehframe_augmented_sp ->Dump (result.GetOutputStream (), thread.get (),
3710- LLDB_INVALID_ADDRESS);
3702+ plan_sp ->Dump (result.GetOutputStream (), thread.get (),
3703+ LLDB_INVALID_ADDRESS);
37113704 result.GetOutputStream ().Printf (" \n " );
37123705 }
37133706
3714- if (UnwindPlanSP plan_sp =
3707+ if (std::shared_ptr< const UnwindPlan> plan_sp =
37153708 func_unwinders_sp->GetDebugFrameUnwindPlan (*target)) {
37163709 result.GetOutputStream ().Printf (" debug_frame UnwindPlan:\n " );
37173710 plan_sp->Dump (result.GetOutputStream (), thread.get (),
37183711 LLDB_INVALID_ADDRESS);
37193712 result.GetOutputStream ().Printf (" \n " );
37203713 }
37213714
3722- if (UnwindPlanSP plan_sp =
3715+ if (std::shared_ptr< const UnwindPlan> plan_sp =
37233716 func_unwinders_sp->GetDebugFrameAugmentedUnwindPlan (*target,
37243717 *thread)) {
37253718 result.GetOutputStream ().Printf (" debug_frame augmented UnwindPlan:\n " );
@@ -3728,36 +3721,35 @@ class CommandObjectTargetModulesShowUnwind : public CommandObjectParsed {
37283721 result.GetOutputStream ().Printf (" \n " );
37293722 }
37303723
3731- UnwindPlanSP arm_unwind_sp =
3732- func_unwinders_sp->GetArmUnwindUnwindPlan (*target);
3733- if (arm_unwind_sp) {
3724+ if (std::shared_ptr<const UnwindPlan> plan_sp =
3725+ func_unwinders_sp->GetArmUnwindUnwindPlan (*target)) {
37343726 result.GetOutputStream ().Printf (" ARM.exidx unwind UnwindPlan:\n " );
3735- arm_unwind_sp ->Dump (result.GetOutputStream (), thread.get (),
3736- LLDB_INVALID_ADDRESS);
3727+ plan_sp ->Dump (result.GetOutputStream (), thread.get (),
3728+ LLDB_INVALID_ADDRESS);
37373729 result.GetOutputStream ().Printf (" \n " );
37383730 }
37393731
3740- if (UnwindPlanSP symfile_plan_sp =
3732+ if (std::shared_ptr< const UnwindPlan> plan_sp =
37413733 func_unwinders_sp->GetSymbolFileUnwindPlan (*thread)) {
37423734 result.GetOutputStream ().Printf (" Symbol file UnwindPlan:\n " );
3743- symfile_plan_sp ->Dump (result.GetOutputStream (), thread.get (),
3744- LLDB_INVALID_ADDRESS);
3735+ plan_sp ->Dump (result.GetOutputStream (), thread.get (),
3736+ LLDB_INVALID_ADDRESS);
37453737 result.GetOutputStream ().Printf (" \n " );
37463738 }
37473739
3748- UnwindPlanSP compact_unwind_sp =
3749- func_unwinders_sp->GetCompactUnwindUnwindPlan (*target);
3750- if (compact_unwind_sp) {
3740+ if (std::shared_ptr<const UnwindPlan> plan_sp =
3741+ func_unwinders_sp->GetCompactUnwindUnwindPlan (*target)) {
37513742 result.GetOutputStream ().Printf (" Compact unwind UnwindPlan:\n " );
3752- compact_unwind_sp ->Dump (result.GetOutputStream (), thread.get (),
3753- LLDB_INVALID_ADDRESS);
3743+ plan_sp ->Dump (result.GetOutputStream (), thread.get (),
3744+ LLDB_INVALID_ADDRESS);
37543745 result.GetOutputStream ().Printf (" \n " );
37553746 }
37563747
3757- if (fast_unwind_plan) {
3748+ if (std::shared_ptr<const UnwindPlan> plan_sp =
3749+ func_unwinders_sp->GetUnwindPlanFastUnwind (*target, *thread)) {
37583750 result.GetOutputStream ().Printf (" Fast UnwindPlan:\n " );
3759- fast_unwind_plan ->Dump (result.GetOutputStream (), thread.get (),
3760- LLDB_INVALID_ADDRESS);
3751+ plan_sp ->Dump (result.GetOutputStream (), thread.get (),
3752+ LLDB_INVALID_ADDRESS);
37613753 result.GetOutputStream ().Printf (" \n " );
37623754 }
37633755
0 commit comments