Fixed CommandReturnObject::SetImmediateErrorFile() to set the correct stream.

Modifed lldb_private::Process to be able to handle connecting to a remote 
target that isn't running a process. This leaves lldb_private::Process in the
eStateConnected state from which we can then do an attach or launch.

Modified ProcessGDBRemote to be able to set stdin, stdout, stderr, working
dir, disable ASLR and a few other settings down by using new GDB remote 
packets. This allows us to keep all of our current launch flags and settings
intact and still be able to communicate them over to the remote GDB server.
Previously these were being sent as arguments to the debugserver binary that
we were spawning. Also modified ProcessGDBRemote to handle losing connection
to the remote GDB server and always exit immediately. We do this by watching
the lldb_private::Communication event bit for the read thread exiting in the
ProcessGDBRemote async thread.

Added support for many of the new 'Q' packets for setting stdin, stdout,
stderr, working dir and disable ASLR to the GDBRemoteCommunication class for
easy accesss.

Modified debugserver for all of the new 'Q' packets and also made it so that
debugserver always exists if it loses connection with the remote debugger.

llvm-svn: 126444
diff --git a/lldb/tools/debugserver/source/RNBContext.h b/lldb/tools/debugserver/source/RNBContext.h
index 93b98de..0044d19 100644
--- a/lldb/tools/debugserver/source/RNBContext.h
+++ b/lldb/tools/debugserver/source/RNBContext.h
@@ -104,12 +104,25 @@
                     }
 
     bool            SetWorkingDirectory (const char *path);
-                        
+
+    std::string&    GetSTDIN  () { return m_stdin; }
+    std::string&    GetSTDOUT () { return m_stdout; }
+    std::string&    GetSTDERR () { return m_stderr; }
+    std::string&    GetWorkingDir () { return m_working_dir; }
+
+    const char *    GetSTDINPath() { return m_stdin.empty() ? NULL : m_stdin.c_str(); }
+    const char *    GetSTDOUTPath() { return m_stdout.empty() ? NULL : m_stdout.c_str(); }
+    const char *    GetSTDERRPath() { return m_stderr.empty() ? NULL : m_stderr.c_str(); }
+    const char *    GetWorkingDirPath() { return m_working_dir.empty() ? NULL : m_working_dir.c_str(); }
 protected:
     //------------------------------------------------------------------
     // Classes that inherit from RNBContext can see and modify these
     //------------------------------------------------------------------
     nub_process_t   m_pid;
+    std::string     m_stdin;
+    std::string     m_stdout;
+    std::string     m_stderr;
+    std::string     m_working_dir;
     nub_size_t      m_pid_stop_count;
     PThreadEvent    m_events;       // Threaded events that we can wait for
     pthread_t       m_pid_pthread;