Enable local llgs debugging on Linux when the use-llgs-for-local setting is enabled.

See http://reviews.llvm.org/D5695 for details.

This change does the following:

Enable lldb-gdbserver (llgs) usage for local-process Linux debugging.
To turn on local llgs debugging support, which is disabled by default, enable this setting:

(lldb) settings set platform.plugin.linux.use-llgs-for-local true
Adds a stream-based Dump() function to FileAction.
Pushes some platform methods that Linux (and FreeBSD) will want to share with MacOSX from PlatformDarwin into PlatformPOSIX.

Reviewed by Greg Clayton.

llvm-svn: 219457
diff --git a/lldb/source/Plugins/Process/Linux/ProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/ProcessLinux.cpp
index 5b051df..3e3feaf 100644
--- a/lldb/source/Plugins/Process/Linux/ProcessLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/ProcessLinux.cpp
@@ -20,6 +20,7 @@
 #include "lldb/Target/Target.h"
 
 #include "ProcessLinux.h"
+#include "Plugins/Platform/Linux/PlatformLinux.h"
 #include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
 #include "Plugins/Process/Utility/InferiorCallPOSIX.h"
 #include "Plugins/Process/Utility/LinuxSignals.h"
@@ -229,6 +230,11 @@
     if (m_core_file)
         return false;
 
+    // If we're using llgs for local debugging, we must not say that this process
+    // is used for debugging.
+    if (PlatformLinux::UseLlgsForLocalDebugging ())
+        return false;
+
     return ProcessPOSIX::CanDebug(target, plugin_specified_by_name);
 }