@@ -391,35 +391,27 @@ Status ABISysV_arm64::SetReturnValueObject(lldb::StackFrameSP &frame_sp,
391391 return error;
392392}
393393
394- bool ABISysV_arm64::CreateFunctionEntryUnwindPlan (UnwindPlan &unwind_plan) {
395- unwind_plan.Clear ();
396- unwind_plan.SetRegisterKind (eRegisterKindDWARF);
397-
394+ UnwindPlanSP ABISysV_arm64::CreateFunctionEntryUnwindPlan () {
398395 uint32_t lr_reg_num = arm64_dwarf::lr;
399396 uint32_t sp_reg_num = arm64_dwarf::sp;
400397
401398 UnwindPlan::RowSP row (new UnwindPlan::Row);
402399
403- // Our previous Call Frame Address is the stack pointer
400+ // Our previous Call Frame Address is the stack pointer, all other registers
401+ // are the same.
404402 row->GetCFAValue ().SetIsRegisterPlusOffset (sp_reg_num, 0 );
405403
406- unwind_plan.AppendRow (row);
407- unwind_plan.SetReturnAddressRegister (lr_reg_num);
408-
409- // All other registers are the same.
410-
411- unwind_plan.SetSourceName (" arm64 at-func-entry default" );
412- unwind_plan.SetSourcedFromCompiler (eLazyBoolNo);
413- unwind_plan.SetUnwindPlanValidAtAllInstructions (eLazyBoolNo);
414- unwind_plan.SetUnwindPlanForSignalTrap (eLazyBoolNo);
415-
416- return true ;
404+ auto plan_sp = std::make_shared<UnwindPlan>(eRegisterKindDWARF);
405+ plan_sp->AppendRow (row);
406+ plan_sp->SetReturnAddressRegister (lr_reg_num);
407+ plan_sp->SetSourceName (" arm64 at-func-entry default" );
408+ plan_sp->SetSourcedFromCompiler (eLazyBoolNo);
409+ plan_sp->SetUnwindPlanValidAtAllInstructions (eLazyBoolNo);
410+ plan_sp->SetUnwindPlanForSignalTrap (eLazyBoolNo);
411+ return plan_sp;
417412}
418413
419- bool ABISysV_arm64::CreateDefaultUnwindPlan (UnwindPlan &unwind_plan) {
420- unwind_plan.Clear ();
421- unwind_plan.SetRegisterKind (eRegisterKindDWARF);
422-
414+ UnwindPlanSP ABISysV_arm64::CreateDefaultUnwindPlan () {
423415 uint32_t fp_reg_num = arm64_dwarf::fp;
424416 uint32_t pc_reg_num = arm64_dwarf::pc;
425417
@@ -433,13 +425,13 @@ bool ABISysV_arm64::CreateDefaultUnwindPlan(UnwindPlan &unwind_plan) {
433425 row->SetRegisterLocationToAtCFAPlusOffset (fp_reg_num, ptr_size * -2 , true );
434426 row->SetRegisterLocationToAtCFAPlusOffset (pc_reg_num, ptr_size * -1 , true );
435427
436- unwind_plan. AppendRow (row );
437- unwind_plan. SetSourceName ( " arm64 default unwind plan " );
438- unwind_plan. SetSourcedFromCompiler (eLazyBoolNo );
439- unwind_plan. SetUnwindPlanValidAtAllInstructions (eLazyBoolNo);
440- unwind_plan. SetUnwindPlanForSignalTrap (eLazyBoolNo);
441-
442- return true ;
428+ auto plan_sp = std::make_shared<UnwindPlan>(eRegisterKindDWARF );
429+ plan_sp-> AppendRow (row );
430+ plan_sp-> SetSourceName ( " arm64 default unwind plan " );
431+ plan_sp-> SetSourcedFromCompiler (eLazyBoolNo);
432+ plan_sp-> SetUnwindPlanValidAtAllInstructions (eLazyBoolNo);
433+ plan_sp-> SetUnwindPlanForSignalTrap (eLazyBoolNo);
434+ return plan_sp ;
443435}
444436
445437// AAPCS64 (Procedure Call Standard for the ARM 64-bit Architecture) says
0 commit comments