diff options
Diffstat (limited to 'source/Plugins/Process/Utility/RegisterContextLLDB.cpp')
-rw-r--r-- | source/Plugins/Process/Utility/RegisterContextLLDB.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source/Plugins/Process/Utility/RegisterContextLLDB.cpp b/source/Plugins/Process/Utility/RegisterContextLLDB.cpp index 423b2e53c..10199f742 100644 --- a/source/Plugins/Process/Utility/RegisterContextLLDB.cpp +++ b/source/Plugins/Process/Utility/RegisterContextLLDB.cpp @@ -34,6 +34,8 @@ #include "RegisterContextLLDB.h" +#include <memory> + using namespace lldb; using namespace lldb_private; @@ -369,7 +371,8 @@ void RegisterContextLLDB::InitializeNonZerothFrame() { if (abi) { m_fast_unwind_plan_sp.reset(); - m_full_unwind_plan_sp.reset(new UnwindPlan(lldb::eRegisterKindGeneric)); + m_full_unwind_plan_sp = + std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric); abi->CreateDefaultUnwindPlan(*m_full_unwind_plan_sp); if (m_frame_type != eSkipFrame) // don't override eSkipFrame { @@ -716,8 +719,8 @@ UnwindPlanSP RegisterContextLLDB::GetFullUnwindPlanForFrame() { Process *process = exe_ctx.GetProcessPtr(); ABI *abi = process ? process->GetABI().get() : NULL; if (abi) { - arch_default_unwind_plan_sp.reset( - new UnwindPlan(lldb::eRegisterKindGeneric)); + arch_default_unwind_plan_sp = + std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric); abi->CreateDefaultUnwindPlan(*arch_default_unwind_plan_sp); } else { UnwindLogMsg( @@ -752,7 +755,8 @@ UnwindPlanSP RegisterContextLLDB::GetFullUnwindPlanForFrame() { process->GetLoadAddressPermissions(current_pc_addr, permissions) && (permissions & ePermissionsExecutable) == 0)) { if (abi) { - unwind_plan_sp.reset(new UnwindPlan(lldb::eRegisterKindGeneric)); + unwind_plan_sp = + std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric); abi->CreateFunctionEntryUnwindPlan(*unwind_plan_sp); m_frame_type = eNormalFrame; return unwind_plan_sp; @@ -793,7 +797,7 @@ UnwindPlanSP RegisterContextLLDB::GetFullUnwindPlanForFrame() { DWARFCallFrameInfo *eh_frame = pc_module_sp->GetObjectFile()->GetUnwindTable().GetEHFrameInfo(); if (eh_frame) { - unwind_plan_sp.reset(new UnwindPlan(lldb::eRegisterKindGeneric)); + unwind_plan_sp = std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric); if (eh_frame->GetUnwindPlan(m_current_pc, *unwind_plan_sp)) return unwind_plan_sp; else @@ -803,7 +807,7 @@ UnwindPlanSP RegisterContextLLDB::GetFullUnwindPlanForFrame() { ArmUnwindInfo *arm_exidx = pc_module_sp->GetObjectFile()->GetUnwindTable().GetArmUnwindInfo(); if (arm_exidx) { - unwind_plan_sp.reset(new UnwindPlan(lldb::eRegisterKindGeneric)); + unwind_plan_sp = std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric); if (arm_exidx->GetUnwindPlan(exe_ctx.GetTargetRef(), m_current_pc, *unwind_plan_sp)) return unwind_plan_sp; |