[Lldb-commits] [lldb] r229379 - Disable LaunchNativeProcess in PlatformLinux for non Linux hosts

Tamas Berghammer tberghammer at google.com
Mon Feb 16 04:59:49 PST 2015


Author: tberghammer
Date: Mon Feb 16 06:59:49 2015
New Revision: 229379

URL: http://llvm.org/viewvc/llvm-project?rev=229379&view=rev
Log:
Disable LaunchNativeProcess in PlatformLinux for non Linux hosts

Modified:
    lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp

Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=229379&r1=229378&r2=229379&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp Mon Feb 16 06:59:49 2015
@@ -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
                                     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
 }





More information about the lldb-commits mailing list