summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins')
-rw-r--r--lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp3
-rw-r--r--lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp10
-rw-r--r--lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h2
-rw-r--r--lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp6
-rw-r--r--lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.h2
-rw-r--r--lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp8
-rw-r--r--lldb/source/Plugins/Platform/Linux/PlatformLinux.h2
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp8
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h2
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp8
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h2
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp6
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h2
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp6
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.h2
-rw-r--r--lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp2
-rw-r--r--lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp10
-rw-r--r--lldb/source/Plugins/Platform/Windows/PlatformWindows.h2
-rw-r--r--lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp6
-rw-r--r--lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h2
-rw-r--r--lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp4
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp2
22 files changed, 49 insertions, 48 deletions
diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
index fa518d30aec..5047b1f2cf0 100644
--- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
+++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
@@ -467,7 +467,8 @@ DynamicLoaderDarwinKernel::DynamicLoaderDarwinKernel (Process* process, lldb::ad
m_mutex(Mutex::eMutexTypeRecursive),
m_break_id (LLDB_INVALID_BREAK_ID)
{
- PlatformSP platform_sp(Platform::FindPlugin (process, PlatformDarwinKernel::GetPluginNameStatic ()));
+ Error error;
+ PlatformSP platform_sp(Platform::Create(PlatformDarwinKernel::GetPluginNameStatic(), error));
// Only select the darwin-kernel Platform if we've been asked to load kexts.
// It can take some time to scan over all of the kext info.plists and that
// shouldn't be done if kext loading is explicitly disabled.
diff --git a/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp b/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
index 7aa940a530b..cc086e3b120 100644
--- a/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
+++ b/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
@@ -32,7 +32,7 @@
using namespace lldb;
using namespace lldb_private;
-Platform *
+PlatformSP
PlatformFreeBSD::CreateInstance (bool force, const lldb_private::ArchSpec *arch)
{
// The only time we create an instance is when we are creating a remote
@@ -84,8 +84,8 @@ PlatformFreeBSD::CreateInstance (bool force, const lldb_private::ArchSpec *arch)
}
}
if (create)
- return new PlatformFreeBSD (is_host);
- return NULL;
+ return PlatformSP(new PlatformFreeBSD (is_host));
+ return PlatformSP();
}
@@ -124,7 +124,7 @@ PlatformFreeBSD::Initialize ()
// Force a host flag to true for the default platform object.
PlatformSP default_platform_sp (new PlatformFreeBSD(true));
default_platform_sp->SetSystemArchitecture(HostInfo::GetArchitecture());
- Platform::SetDefaultPlatform (default_platform_sp);
+ Platform::SetHostPlatform (default_platform_sp);
#endif
PluginManager::RegisterPlugin(PlatformFreeBSD::GetPluginNameStatic(false),
PlatformFreeBSD::GetDescriptionStatic(false),
@@ -404,7 +404,7 @@ PlatformFreeBSD::ConnectRemote (Args& args)
else
{
if (!m_remote_platform_sp)
- m_remote_platform_sp = Platform::Create ("remote-gdb-server", error);
+ m_remote_platform_sp = Platform::Create (ConstString("remote-gdb-server"), error);
if (m_remote_platform_sp)
{
diff --git a/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h b/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h
index 62958a08a9e..15591da889d 100644
--- a/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h
+++ b/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h
@@ -24,7 +24,7 @@ public:
//------------------------------------------------------------
// Class functions
//------------------------------------------------------------
- static lldb_private::Platform*
+ static lldb::PlatformSP
CreateInstance (bool force, const lldb_private::ArchSpec *arch);
static void
diff --git a/lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp b/lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp
index f1bfadd662a..068b1b10e72 100644
--- a/lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp
+++ b/lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp
@@ -32,7 +32,7 @@ using namespace lldb_private;
static uint32_t g_initialize_count = 0;
-Platform *
+PlatformSP
PlatformKalimba::CreateInstance (bool force, const ArchSpec *arch)
{
bool create = force;
@@ -50,8 +50,8 @@ PlatformKalimba::CreateInstance (bool force, const ArchSpec *arch)
}
}
if (create)
- return new PlatformKalimba(false);
- return NULL;
+ return PlatformSP(new PlatformKalimba(false));
+ return PlatformSP();
}
lldb_private::ConstString
diff --git a/lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.h b/lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.h
index b3e7d31cf42..6653ce1f054 100644
--- a/lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.h
+++ b/lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.h
@@ -36,7 +36,7 @@ namespace lldb_private {
//------------------------------------------------------------
// lldb_private::PluginInterface functions
//------------------------------------------------------------
- static Platform *
+ static lldb::PlatformSP
CreateInstance (bool force, const lldb_private::ArchSpec *arch);
static lldb_private::ConstString
diff --git a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
index 1d15d5cd01b..3b0aa5a4f80 100644
--- a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
+++ b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
@@ -118,7 +118,7 @@ PlatformLinux::DebuggerInitialize (lldb_private::Debugger &debugger)
//------------------------------------------------------------------
-Platform *
+PlatformSP
PlatformLinux::CreateInstance (bool force, const ArchSpec *arch)
{
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PLATFORM));
@@ -183,13 +183,13 @@ PlatformLinux::CreateInstance (bool force, const ArchSpec *arch)
{
if (log)
log->Printf ("PlatformLinux::%s() creating remote-linux platform", __FUNCTION__);
- return new PlatformLinux(false);
+ return PlatformSP(new PlatformLinux(false));
}
if (log)
log->Printf ("PlatformLinux::%s() aborting creation of remote-linux platform", __FUNCTION__);
- return NULL;
+ return PlatformSP();
}
@@ -231,7 +231,7 @@ PlatformLinux::Initialize ()
#if defined(__linux__)
PlatformSP default_platform_sp (new PlatformLinux(true));
default_platform_sp->SetSystemArchitecture(HostInfo::GetArchitecture());
- Platform::SetDefaultPlatform (default_platform_sp);
+ Platform::SetHostPlatform (default_platform_sp);
#endif
PluginManager::RegisterPlugin(PlatformLinux::GetPluginNameStatic(false),
PlatformLinux::GetPluginDescriptionStatic(false),
diff --git a/lldb/source/Plugins/Platform/Linux/PlatformLinux.h b/lldb/source/Plugins/Platform/Linux/PlatformLinux.h
index bdfb66dea58..7c83d409e12 100644
--- a/lldb/source/Plugins/Platform/Linux/PlatformLinux.h
+++ b/lldb/source/Plugins/Platform/Linux/PlatformLinux.h
@@ -39,7 +39,7 @@ namespace lldb_private {
//------------------------------------------------------------
// lldb_private::PluginInterface functions
//------------------------------------------------------------
- static Platform *
+ static lldb::PlatformSP
CreateInstance (bool force, const lldb_private::ArchSpec *arch);
static lldb_private::ConstString
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
index 4ed96c6dbc6..dc2217b3392 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
@@ -72,14 +72,14 @@ PlatformDarwinKernel::Terminate ()
}
}
-Platform*
+PlatformSP
PlatformDarwinKernel::CreateInstance (bool force, const ArchSpec *arch)
{
// This is a special plugin that we don't want to activate just based on an ArchSpec for normal
// userlnad debugging. It is only useful in kernel debug sessions and the DynamicLoaderDarwinPlugin
// (or a user doing 'platform select') will force the creation of this Platform plugin.
if (force == false)
- return NULL;
+ return PlatformSP();
bool create = force;
LazyBool is_ios_debug_session = eLazyBoolCalculate;
@@ -143,8 +143,8 @@ PlatformDarwinKernel::CreateInstance (bool force, const ArchSpec *arch)
}
}
if (create)
- return new PlatformDarwinKernel (is_ios_debug_session);
- return NULL;
+ return PlatformSP(new PlatformDarwinKernel (is_ios_debug_session));
+ return PlatformSP();
}
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h
index 6e45e100e5d..3a901d69331 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h
@@ -30,7 +30,7 @@ public:
//------------------------------------------------------------
// Class Functions
//------------------------------------------------------------
- static lldb_private::Platform*
+ static lldb::PlatformSP
CreateInstance (bool force, const lldb_private::ArchSpec *arch);
static void
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
index 50094f7f504..55a30bcc50c 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
@@ -45,7 +45,7 @@ PlatformMacOSX::Initialize ()
#if defined (__APPLE__)
PlatformSP default_platform_sp (new PlatformMacOSX(true));
default_platform_sp->SetSystemArchitecture(HostInfo::GetArchitecture());
- Platform::SetDefaultPlatform (default_platform_sp);
+ Platform::SetHostPlatform (default_platform_sp);
#endif
PluginManager::RegisterPlugin (PlatformMacOSX::GetPluginNameStatic(false),
PlatformMacOSX::GetDescriptionStatic(false),
@@ -66,7 +66,7 @@ PlatformMacOSX::Terminate ()
}
}
-Platform*
+PlatformSP
PlatformMacOSX::CreateInstance (bool force, const ArchSpec *arch)
{
// The only time we create an instance is when we are creating a remote
@@ -117,8 +117,8 @@ PlatformMacOSX::CreateInstance (bool force, const ArchSpec *arch)
}
}
if (create)
- return new PlatformMacOSX (is_host);
- return NULL;
+ return PlatformSP(new PlatformMacOSX (is_host));
+ return PlatformSP();
}
lldb_private::ConstString
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h
index 57e57e7b38e..3f5cef93a82 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h
@@ -23,7 +23,7 @@ public:
//------------------------------------------------------------
// Class functions
//------------------------------------------------------------
- static lldb_private::Platform*
+ static lldb::PlatformSP
CreateInstance (bool force, const lldb_private::ArchSpec *arch);
static void
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
index dd6d93815e5..8058efc9971 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
@@ -83,7 +83,7 @@ PlatformRemoteiOS::Terminate ()
}
}
-Platform*
+PlatformSP
PlatformRemoteiOS::CreateInstance (bool force, const ArchSpec *arch)
{
bool create = force;
@@ -144,8 +144,8 @@ PlatformRemoteiOS::CreateInstance (bool force, const ArchSpec *arch)
}
if (create)
- return new PlatformRemoteiOS ();
- return NULL;
+ return lldb::PlatformSP(new PlatformRemoteiOS ());
+ return lldb::PlatformSP();
}
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h
index 7eb2660dc6f..47ea6a6cc91 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h
@@ -25,7 +25,7 @@ public:
//------------------------------------------------------------
// Class Functions
//------------------------------------------------------------
- static lldb_private::Platform*
+ static lldb::PlatformSP
CreateInstance (bool force, const lldb_private::ArchSpec *arch);
static void
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
index 0d4523e46b0..caa4a303903 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
@@ -61,7 +61,7 @@ PlatformiOSSimulator::Terminate ()
}
}
-Platform*
+PlatformSP
PlatformiOSSimulator::CreateInstance (bool force, const ArchSpec *arch)
{
bool create = force;
@@ -120,8 +120,8 @@ PlatformiOSSimulator::CreateInstance (bool force, const ArchSpec *arch)
}
}
if (create)
- return new PlatformiOSSimulator ();
- return NULL;
+ return PlatformSP(new PlatformiOSSimulator ());
+ return PlatformSP();
}
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.h b/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.h
index 81394a44e02..37869754751 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.h
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.h
@@ -23,7 +23,7 @@ public:
//------------------------------------------------------------
// Class Functions
//------------------------------------------------------------
- static lldb_private::Platform*
+ static lldb::PlatformSP
CreateInstance (bool force, const lldb_private::ArchSpec *arch);
static void
diff --git a/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp b/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
index 05e673f3296..0b06a6efd11 100644
--- a/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
+++ b/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
@@ -699,7 +699,7 @@ PlatformPOSIX::ConnectRemote (Args& args)
else
{
if (!m_remote_platform_sp)
- m_remote_platform_sp = Platform::Create ("remote-gdb-server", error);
+ m_remote_platform_sp = Platform::Create (ConstString("remote-gdb-server"), error);
if (m_remote_platform_sp && error.Success())
error = m_remote_platform_sp->ConnectRemote (args);
diff --git a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
index 82015e4613a..c6e79e4e190 100644
--- a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
+++ b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
@@ -66,7 +66,7 @@ namespace
};
}
-Platform *
+PlatformSP
PlatformWindows::CreateInstance (bool force, const lldb_private::ArchSpec *arch)
{
// The only time we create an instance is when we are creating a remote
@@ -109,8 +109,8 @@ PlatformWindows::CreateInstance (bool force, const lldb_private::ArchSpec *arch)
}
}
if (create)
- return new PlatformWindows (is_host);
- return NULL;
+ return PlatformSP(new PlatformWindows (is_host));
+ return PlatformSP();
}
@@ -154,7 +154,7 @@ PlatformWindows::Initialize(void)
// Force a host flag to true for the default platform object.
PlatformSP default_platform_sp (new PlatformWindows(true));
default_platform_sp->SetSystemArchitecture(HostInfo::GetArchitecture());
- Platform::SetDefaultPlatform (default_platform_sp);
+ Platform::SetHostPlatform (default_platform_sp);
#endif
PluginManager::RegisterPlugin(PlatformWindows::GetPluginNameStatic(false),
PlatformWindows::GetPluginDescriptionStatic(false),
@@ -417,7 +417,7 @@ PlatformWindows::ConnectRemote (Args& args)
else
{
if (!m_remote_platform_sp)
- m_remote_platform_sp = Platform::Create ("remote-gdb-server", error);
+ m_remote_platform_sp = Platform::Create (ConstString("remote-gdb-server"), error);
if (m_remote_platform_sp)
{
diff --git a/lldb/source/Plugins/Platform/Windows/PlatformWindows.h b/lldb/source/Plugins/Platform/Windows/PlatformWindows.h
index 062d5cdb949..a7d470cadf5 100644
--- a/lldb/source/Plugins/Platform/Windows/PlatformWindows.h
+++ b/lldb/source/Plugins/Platform/Windows/PlatformWindows.h
@@ -37,7 +37,7 @@ public:
//------------------------------------------------------------
// lldb_private::PluginInterface functions
//------------------------------------------------------------
- static lldb_private::Platform*
+ static lldb::PlatformSP
CreateInstance (bool force, const lldb_private::ArchSpec *arch);
diff --git a/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp b/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
index af8fd9ed4cb..a2f6f43c586 100644
--- a/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
+++ b/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
@@ -56,7 +56,7 @@ PlatformRemoteGDBServer::Terminate ()
}
}
-Platform*
+PlatformSP
PlatformRemoteGDBServer::CreateInstance (bool force, const lldb_private::ArchSpec *arch)
{
bool create = force;
@@ -65,8 +65,8 @@ PlatformRemoteGDBServer::CreateInstance (bool force, const lldb_private::ArchSpe
create = !arch->TripleVendorWasSpecified() && !arch->TripleOSWasSpecified();
}
if (create)
- return new PlatformRemoteGDBServer ();
- return NULL;
+ return PlatformSP(new PlatformRemoteGDBServer());
+ return PlatformSP();
}
diff --git a/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h b/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
index e236e97c8bb..6f358889907 100644
--- a/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
+++ b/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
@@ -29,7 +29,7 @@ public:
static void
Terminate ();
- static lldb_private::Platform*
+ static lldb::PlatformSP
CreateInstance (bool force, const lldb_private::ArchSpec *arch);
static lldb_private::ConstString
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
index f77b73e5670..6a397361d2a 100644
--- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
@@ -1278,7 +1278,7 @@ NativeProcessLinux::AttachToProcess (
// Grab the current platform architecture. This should be Linux,
// since this code is only intended to run on a Linux host.
- PlatformSP platform_sp (Platform::GetDefaultPlatform ());
+ PlatformSP platform_sp (Platform::GetHostPlatform ());
if (!platform_sp)
return Error("failed to get a valid default platform");
@@ -1412,7 +1412,7 @@ NativeProcessLinux::AttachToInferior (lldb::pid_t pid, lldb_private::Error &erro
log->Printf ("NativeProcessLinux::%s (pid = %" PRIi64 ")", __FUNCTION__, pid);
// We can use the Host for everything except the ResolveExecutable portion.
- PlatformSP platform_sp = Platform::GetDefaultPlatform ();
+ PlatformSP platform_sp = Platform::GetHostPlatform ();
if (!platform_sp)
{
if (log)
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
index b20a8aba87a..7217cd5f897 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
@@ -71,7 +71,7 @@ namespace
//----------------------------------------------------------------------
GDBRemoteCommunicationServer::GDBRemoteCommunicationServer(bool is_platform) :
GDBRemoteCommunication ("gdb-remote.server", "gdb-remote.server.rx_packet", is_platform),
- m_platform_sp (Platform::GetDefaultPlatform ()),
+ m_platform_sp (Platform::GetHostPlatform ()),
m_async_thread (LLDB_INVALID_HOST_THREAD),
m_process_launch_info (),
m_process_launch_error (),
OpenPOWER on IntegriCloud