aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectProcess.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands/CommandObjectProcess.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectProcess.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp
index 16f4b9e..0400dfb 100644
--- a/lldb/source/Commands/CommandObjectProcess.cpp
+++ b/lldb/source/Commands/CommandObjectProcess.cpp
@@ -257,11 +257,23 @@ public:
if (!m_options.launch_info.GetArchitecture().IsValid())
m_options.launch_info.GetArchitecture() = target->GetArchitecture();
- process = target->GetPlatform()->DebugProcess (m_options.launch_info,
- debugger,
- target,
- debugger.GetListener(),
- error).get();
+ PlatformSP platform_sp (target->GetPlatform());
+
+ if (platform_sp && platform_sp->CanDebugProcess ())
+ {
+ process = target->GetPlatform()->DebugProcess (m_options.launch_info,
+ debugger,
+ target,
+ debugger.GetListener(),
+ error).get();
+ }
+ else
+ {
+ const char *plugin_name = m_options.launch_info.GetProcessPluginName();
+ process = target->CreateProcess (debugger.GetListener(), plugin_name).get();
+ if (process)
+ error = process->Launch (m_options.launch_info);
+ }
if (process == NULL)
{