summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
diff options
context:
space:
mode:
authorVince Harron <vharron@google.com>2015-02-06 18:32:57 +0000
committerVince Harron <vharron@google.com>2015-02-06 18:32:57 +0000
commite0be425a53b09e995610441e98666f94b7554efd (patch)
tree576e5356278d73cd4d967923a36f271323e66568 /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
parent7206d7a5d2b1d1882c64d216690a278cc15ea4d1 (diff)
downloadbcm5719-llvm-e0be425a53b09e995610441e98666f94b7554efd.tar.gz
bcm5719-llvm-e0be425a53b09e995610441e98666f94b7554efd.zip
Add support for SBProcess::PutSTDIN to remote processes
Processes running on a remote target can already send $O messages to send stdout but there is no way to send stdin to a remote inferior. This allows processes using the API to pump stdin into a remote inferior process. It fixes a hang in TestProcessIO.py when running against a remote target. llvm-svn: 228419
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 0ef05acd957..cb0b4bb5100 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -942,6 +942,7 @@ ProcessGDBRemote::DoLaunch (Module *exe_module, ProcessLaunchInfo &launch_info)
SetPrivateState (SetThreadStopInfo (m_last_stop_packet));
+ m_stdio_disable = disable_stdio;
if (!disable_stdio)
{
if (pty.GetMasterFileDescriptor() != lldb_utility::PseudoTerminal::invalid_fd)
@@ -2477,6 +2478,10 @@ ProcessGDBRemote::PutSTDIN (const char *src, size_t src_len, Error &error)
ConnectionStatus status;
m_stdio_communication.Write(src, src_len, status, NULL);
}
+ else if (!m_stdio_disable)
+ {
+ m_gdb_comm.SendStdinNotification(src, src_len);
+ }
return 0;
}
OpenPOWER on IntegriCloud