Disable LaunchNativeProcess in PlatformLinux for non Linux hosts

llvm-svn: 229379
This commit is contained in:
Tamas Berghammer 2015-02-16 12:59:49 +00:00
parent 1e57e2deb8
commit c6ec76e38f

View File

@ -853,6 +853,9 @@ PlatformLinux::LaunchNativeProcess (
lldb_private::NativeProcessProtocol::NativeDelegate &native_delegate,
NativeProcessProtocolSP &process_sp)
{
#if !defined(__linux__)
return Error("Only implemented on Linux hosts");
#else
if (!IsHost ())
return Error("PlatformLinux::%s (): cannot launch a debug process when not the host", __FUNCTION__);
@ -879,6 +882,7 @@ PlatformLinux::LaunchNativeProcess (
process_sp);
return error;
#endif
}
Error
@ -886,9 +890,13 @@ PlatformLinux::AttachNativeProcess (lldb::pid_t pid,
lldb_private::NativeProcessProtocol::NativeDelegate &native_delegate,
NativeProcessProtocolSP &process_sp)
{
#if !defined(__linux__)
return Error("Only implemented on Linux hosts");
#else
if (!IsHost ())
return Error("PlatformLinux::%s (): cannot attach to a debug process when not the host", __FUNCTION__);
// Launch it for debugging
return NativeProcessLinux::AttachToProcess (pid, native_delegate, process_sp);
#endif
}