diff options
author | Caroline Tice <ctice@apple.com> | 2011-01-28 00:19:58 +0000 |
---|---|---|
committer | Caroline Tice <ctice@apple.com> | 2011-01-28 00:19:58 +0000 |
commit | ba8df270e6bcf07c098927aa955ac05bcba64a6e (patch) | |
tree | 0e9ade960fc83ff80b449c349542191604e9c4f6 /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | |
parent | bb8420a070bff2f70ebf8c5e5e3964efe131ab2c (diff) | |
download | bcm5719-llvm-ba8df270e6bcf07c098927aa955ac05bcba64a6e.tar.gz bcm5719-llvm-ba8df270e6bcf07c098927aa955ac05bcba64a6e.zip |
If the user specfies one of stdin, stdout or stderr, don't
automatically set the non-specified ones to /dev/null.
llvm-svn: 124459
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index 6ec7dab1af1..ee6e3aed14b 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -1845,14 +1845,27 @@ ProcessGDBRemote::StartDebugserverProcess lldb_utility::PseudoTerminal pty; const char *stdio_path = NULL; if (launch_process && - stdin_path == NULL && - stdout_path == NULL && - stderr_path == NULL && + (stdin_path == NULL || stdout_path == NULL || stderr_path == NULL) && m_local_debugserver && no_stdio == false) { if (pty.OpenFirstAvailableMaster(O_RDWR|O_NOCTTY, NULL, 0)) - stdio_path = pty.GetSlaveName (NULL, 0); + { + const char *slave_name = pty.GetSlaveName (NULL, 0); + if (stdin_path == NULL + && stdout_path == NULL + && stderr_path == NULL) + stdio_path = slave_name; + else + { + if (stdin_path == NULL) + stdin_path = slave_name; + if (stdout_path == NULL) + stdout_path = slave_name; + if (stderr_path == NULL) + stderr_path = slave_name; + } + } } // Start args with "debugserver /file/path -r --" |