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