[Lldb-commits] [lldb] r124459 - /lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
Caroline Tice
ctice at apple.com
Thu Jan 27 16:19:58 PST 2011
Author: ctice
Date: Thu Jan 27 18:19:58 2011
New Revision: 124459
URL: http://llvm.org/viewvc/llvm-project?rev=124459&view=rev
Log:
If the user specfies one of stdin, stdout or stderr, don't
automatically set the non-specified ones to /dev/null.
Modified:
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=124459&r1=124458&r2=124459&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Thu Jan 27 18:19:58 2011
@@ -1845,14 +1845,27 @@
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 --"
More information about the lldb-commits
mailing list