@@ -3641,78 +3641,85 @@ class CommandObjectTargetModulesShowUnwind : public CommandObjectParsed {
3641
3641
3642
3642
result.GetOutputStream ().Printf (" \n " );
3643
3643
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) {
3646
3647
result.GetOutputStream ().Printf (
3647
3648
" Asynchronous (not restricted to call-sites) UnwindPlan is '%s'\n " ,
3648
- plan_sp ->GetSourceName ().AsCString ());
3649
+ non_callsite_unwind_plan ->GetSourceName ().AsCString ());
3649
3650
}
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) {
3652
3654
result.GetOutputStream ().Printf (
3653
3655
" Synchronous (restricted to call-sites) UnwindPlan is '%s'\n " ,
3654
- plan_sp ->GetSourceName ().AsCString ());
3656
+ callsite_unwind_plan ->GetSourceName ().AsCString ());
3655
3657
}
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 ());
3660
3664
}
3661
3665
3662
3666
result.GetOutputStream ().Printf (" \n " );
3663
3667
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) {
3666
3671
result.GetOutputStream ().Printf (
3667
3672
" 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);
3670
3675
result.GetOutputStream ().Printf (" \n " );
3671
3676
}
3672
3677
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) {
3675
3681
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);
3678
3684
result.GetOutputStream ().Printf (" \n " );
3679
3685
}
3680
3686
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 ) {
3684
3690
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);
3687
3693
result.GetOutputStream ().Printf (" \n " );
3688
3694
}
3689
3695
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) {
3692
3699
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);
3695
3702
result.GetOutputStream ().Printf (" \n " );
3696
3703
}
3697
3704
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 ) {
3701
3708
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);
3704
3711
result.GetOutputStream ().Printf (" \n " );
3705
3712
}
3706
3713
3707
- if (std::shared_ptr< const UnwindPlan> plan_sp =
3714
+ if (UnwindPlanSP plan_sp =
3708
3715
func_unwinders_sp->GetDebugFrameUnwindPlan (*target)) {
3709
3716
result.GetOutputStream ().Printf (" debug_frame UnwindPlan:\n " );
3710
3717
plan_sp->Dump (result.GetOutputStream (), thread.get (),
3711
3718
LLDB_INVALID_ADDRESS);
3712
3719
result.GetOutputStream ().Printf (" \n " );
3713
3720
}
3714
3721
3715
- if (std::shared_ptr< const UnwindPlan> plan_sp =
3722
+ if (UnwindPlanSP plan_sp =
3716
3723
func_unwinders_sp->GetDebugFrameAugmentedUnwindPlan (*target,
3717
3724
*thread)) {
3718
3725
result.GetOutputStream ().Printf (" debug_frame augmented UnwindPlan:\n " );
@@ -3721,35 +3728,36 @@ class CommandObjectTargetModulesShowUnwind : public CommandObjectParsed {
3721
3728
result.GetOutputStream ().Printf (" \n " );
3722
3729
}
3723
3730
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) {
3726
3734
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);
3729
3737
result.GetOutputStream ().Printf (" \n " );
3730
3738
}
3731
3739
3732
- if (std::shared_ptr< const UnwindPlan> plan_sp =
3740
+ if (UnwindPlanSP symfile_plan_sp =
3733
3741
func_unwinders_sp->GetSymbolFileUnwindPlan (*thread)) {
3734
3742
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);
3737
3745
result.GetOutputStream ().Printf (" \n " );
3738
3746
}
3739
3747
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) {
3742
3751
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);
3745
3754
result.GetOutputStream ().Printf (" \n " );
3746
3755
}
3747
3756
3748
- if (std::shared_ptr<const UnwindPlan> plan_sp =
3749
- func_unwinders_sp->GetUnwindPlanFastUnwind (*target, *thread)) {
3757
+ if (fast_unwind_plan) {
3750
3758
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);
3753
3761
result.GetOutputStream ().Printf (" \n " );
3754
3762
}
3755
3763
0 commit comments