|
17 | 17 | #include "lldb/Core/Module.h" |
18 | 18 | #include "lldb/Core/PluginManager.h" |
19 | 19 | #include "lldb/Core/Value.h" |
20 | | -#include "lldb/Symbol/UnwindPlan.h" |
21 | 20 | #include "lldb/Target/Process.h" |
22 | 21 | #include "lldb/Target/RegisterContext.h" |
23 | 22 | #include "lldb/Target/Target.h" |
|
30 | 29 | #include "lldb/Utility/Status.h" |
31 | 30 | #include "lldb/ValueObject/ValueObjectConstResult.h" |
32 | 31 |
|
33 | | -#include "Utility/ARM64_DWARF_Registers.h" |
34 | | - |
35 | 32 | using namespace lldb; |
36 | 33 | using namespace lldb_private; |
37 | 34 |
|
@@ -344,48 +341,6 @@ ABIMacOSX_arm64::SetReturnValueObject(lldb::StackFrameSP &frame_sp, |
344 | 341 | return error; |
345 | 342 | } |
346 | 343 |
|
347 | | -UnwindPlanSP ABIMacOSX_arm64::CreateFunctionEntryUnwindPlan() { |
348 | | - uint32_t lr_reg_num = arm64_dwarf::lr; |
349 | | - uint32_t sp_reg_num = arm64_dwarf::sp; |
350 | | - uint32_t pc_reg_num = arm64_dwarf::pc; |
351 | | - |
352 | | - UnwindPlan::Row row; |
353 | | - |
354 | | - // Our previous Call Frame Address is the stack pointer |
355 | | - row.GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 0); |
356 | | - |
357 | | - // Our previous PC is in the LR, all other registers are the same. |
358 | | - row.SetRegisterLocationToRegister(pc_reg_num, lr_reg_num, true); |
359 | | - |
360 | | - auto plan_sp = std::make_shared<UnwindPlan>(eRegisterKindDWARF); |
361 | | - plan_sp->AppendRow(std::move(row)); |
362 | | - plan_sp->SetSourceName("arm64 at-func-entry default"); |
363 | | - plan_sp->SetSourcedFromCompiler(eLazyBoolNo); |
364 | | - return plan_sp; |
365 | | -} |
366 | | - |
367 | | -UnwindPlanSP ABIMacOSX_arm64::CreateDefaultUnwindPlan() { |
368 | | - uint32_t fp_reg_num = arm64_dwarf::fp; |
369 | | - uint32_t pc_reg_num = arm64_dwarf::pc; |
370 | | - |
371 | | - UnwindPlan::Row row; |
372 | | - const int32_t ptr_size = 8; |
373 | | - |
374 | | - row.GetCFAValue().SetIsRegisterPlusOffset(fp_reg_num, 2 * ptr_size); |
375 | | - row.SetUnspecifiedRegistersAreUndefined(true); |
376 | | - |
377 | | - row.SetRegisterLocationToAtCFAPlusOffset(fp_reg_num, ptr_size * -2, true); |
378 | | - row.SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, ptr_size * -1, true); |
379 | | - |
380 | | - auto plan_sp = std::make_shared<UnwindPlan>(eRegisterKindDWARF); |
381 | | - plan_sp->AppendRow(std::move(row)); |
382 | | - plan_sp->SetSourceName("arm64-apple-darwin default unwind plan"); |
383 | | - plan_sp->SetSourcedFromCompiler(eLazyBoolNo); |
384 | | - plan_sp->SetUnwindPlanValidAtAllInstructions(eLazyBoolNo); |
385 | | - plan_sp->SetUnwindPlanForSignalTrap(eLazyBoolNo); |
386 | | - return plan_sp; |
387 | | -} |
388 | | - |
389 | 344 | // AAPCS64 (Procedure Call Standard for the ARM 64-bit Architecture) says |
390 | 345 | // registers x19 through x28 and sp are callee preserved. v8-v15 are non- |
391 | 346 | // volatile (and specifically only the lower 8 bytes of these regs), the rest |
|
0 commit comments