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
1 changed files with 8 additions and 0 deletions

View File

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