summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/MacOSX-Kernel
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Process/MacOSX-Kernel')
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp13
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp17
2 files changed, 17 insertions, 13 deletions
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
index ef13bd73346..f95dc23c3d8 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
@@ -9,6 +9,7 @@
#include <errno.h>
#include <stdlib.h>
+#include <memory>
#include <mutex>
#include "lldb/Core/Debugger.h"
@@ -63,7 +64,7 @@ public:
}
PluginProperties() : Properties() {
- m_collection_sp.reset(new OptionValueProperties(GetSettingName()));
+ m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
m_collection_sp->Initialize(g_properties);
}
@@ -81,7 +82,7 @@ typedef std::shared_ptr<PluginProperties> ProcessKDPPropertiesSP;
static const ProcessKDPPropertiesSP &GetGlobalPluginProperties() {
static ProcessKDPPropertiesSP g_settings_sp;
if (!g_settings_sp)
- g_settings_sp.reset(new PluginProperties());
+ g_settings_sp = std::make_shared<PluginProperties>();
return g_settings_sp;
}
@@ -108,7 +109,7 @@ lldb::ProcessSP ProcessKDP::CreateInstance(TargetSP target_sp,
const FileSpec *crash_file_path) {
lldb::ProcessSP process_sp;
if (crash_file_path == NULL)
- process_sp.reset(new ProcessKDP(target_sp, listener_sp));
+ process_sp = std::make_shared<ProcessKDP>(target_sp, listener_sp);
return process_sp;
}
@@ -505,7 +506,7 @@ lldb::ThreadSP ProcessKDP::GetKernelThread() {
ThreadSP thread_sp(m_kernel_thread_wp.lock());
if (!thread_sp) {
- thread_sp.reset(new ThreadKDP(*this, g_kernel_tid));
+ thread_sp = std::make_shared<ThreadKDP>(*this, g_kernel_tid);
m_kernel_thread_wp = thread_sp;
}
return thread_sp;
@@ -1030,7 +1031,7 @@ public:
CommandObject *ProcessKDP::GetPluginCommandObject() {
if (!m_command_sp)
- m_command_sp.reset(new CommandObjectMultiwordProcessKDP(
- GetTarget().GetDebugger().GetCommandInterpreter()));
+ m_command_sp = std::make_shared<CommandObjectMultiwordProcessKDP>(
+ GetTarget().GetDebugger().GetCommandInterpreter());
return m_command_sp.get();
}
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
index d0e78a8e74d..341c6329ad6 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
@@ -29,6 +29,8 @@
#include "RegisterContextKDP_i386.h"
#include "RegisterContextKDP_x86_64.h"
+#include <memory>
+
using namespace lldb;
using namespace lldb_private;
@@ -98,19 +100,20 @@ ThreadKDP::CreateRegisterContextForFrame(StackFrame *frame) {
->GetCommunication()
.GetCPUType()) {
case llvm::MachO::CPU_TYPE_ARM:
- reg_ctx_sp.reset(new RegisterContextKDP_arm(*this, concrete_frame_idx));
+ reg_ctx_sp =
+ std::make_shared<RegisterContextKDP_arm>(*this, concrete_frame_idx);
break;
case llvm::MachO::CPU_TYPE_ARM64:
- reg_ctx_sp.reset(
- new RegisterContextKDP_arm64(*this, concrete_frame_idx));
+ reg_ctx_sp = std::make_shared<RegisterContextKDP_arm64>(
+ *this, concrete_frame_idx);
break;
case llvm::MachO::CPU_TYPE_I386:
- reg_ctx_sp.reset(
- new RegisterContextKDP_i386(*this, concrete_frame_idx));
+ reg_ctx_sp = std::make_shared<RegisterContextKDP_i386>(
+ *this, concrete_frame_idx);
break;
case llvm::MachO::CPU_TYPE_X86_64:
- reg_ctx_sp.reset(
- new RegisterContextKDP_x86_64(*this, concrete_frame_idx));
+ reg_ctx_sp = std::make_shared<RegisterContextKDP_x86_64>(
+ *this, concrete_frame_idx);
break;
default:
llvm_unreachable("Add CPU type support in KDP");
OpenPOWER on IntegriCloud