aboutsummaryrefslogtreecommitdiffstats
path: root/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp')
-rw-r--r--source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp b/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp
index faa995033ac2..857b7fee10e3 100644
--- a/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp
+++ b/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp
@@ -218,7 +218,8 @@ size_t ABISysV_ppc::GetRedZoneSize() const { return 224; }
ABISP
ABISysV_ppc::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
if (arch.GetTriple().getArch() == llvm::Triple::ppc) {
- return ABISP(new ABISysV_ppc(process_sp));
+ return ABISP(
+ new ABISysV_ppc(std::move(process_sp), MakeMCRegisterInfo(arch)));
}
return ABISP();
}
@@ -255,18 +256,16 @@ bool ABISysV_ppc::PrepareTrivialCall(Thread &thread, addr_t sp,
for (size_t i = 0; i < args.size(); ++i) {
reg_info = reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
LLDB_REGNUM_GENERIC_ARG1 + i);
- if (log)
- log->Printf("About to write arg%" PRIu64 " (0x%" PRIx64 ") into %s",
- static_cast<uint64_t>(i + 1), args[i], reg_info->name);
+ LLDB_LOGF(log, "About to write arg%" PRIu64 " (0x%" PRIx64 ") into %s",
+ static_cast<uint64_t>(i + 1), args[i], reg_info->name);
if (!reg_ctx->WriteRegisterFromUnsigned(reg_info, args[i]))
return false;
}
// First, align the SP
- if (log)
- log->Printf("16-byte aligning SP: 0x%" PRIx64 " to 0x%" PRIx64,
- (uint64_t)sp, (uint64_t)(sp & ~0xfull));
+ LLDB_LOGF(log, "16-byte aligning SP: 0x%" PRIx64 " to 0x%" PRIx64,
+ (uint64_t)sp, (uint64_t)(sp & ~0xfull));
sp &= ~(0xfull); // 16-byte alignment
@@ -281,10 +280,10 @@ bool ABISysV_ppc::PrepareTrivialCall(Thread &thread, addr_t sp,
RegisterValue reg_value;
- if (log)
- log->Printf("Pushing the return address onto the stack: 0x%" PRIx64
- ": 0x%" PRIx64,
- (uint64_t)sp, (uint64_t)return_addr);
+ LLDB_LOGF(log,
+ "Pushing the return address onto the stack: 0x%" PRIx64
+ ": 0x%" PRIx64,
+ (uint64_t)sp, (uint64_t)return_addr);
// Save return address onto the stack
if (!process_sp->WritePointerToMemory(sp, return_addr, error))
@@ -292,16 +291,14 @@ bool ABISysV_ppc::PrepareTrivialCall(Thread &thread, addr_t sp,
// %r1 is set to the actual stack value.
- if (log)
- log->Printf("Writing SP: 0x%" PRIx64, (uint64_t)sp);
+ LLDB_LOGF(log, "Writing SP: 0x%" PRIx64, (uint64_t)sp);
if (!reg_ctx->WriteRegisterFromUnsigned(sp_reg_info, sp))
return false;
// %pc is set to the address of the called function.
- if (log)
- log->Printf("Writing IP: 0x%" PRIx64, (uint64_t)func_addr);
+ LLDB_LOGF(log, "Writing IP: 0x%" PRIx64, (uint64_t)func_addr);
if (!reg_ctx->WriteRegisterFromUnsigned(pc_reg_info, func_addr))
return false;
@@ -910,6 +907,7 @@ bool ABISysV_ppc::CreateDefaultUnwindPlan(UnwindPlan &unwind_plan) {
unwind_plan.SetSourceName("ppc default unwind plan");
unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
+ unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
unwind_plan.SetReturnAddressRegister(dwarf_lr);
return true;
}