summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.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/GDBRemoteCommunicationClient.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/GDBRemoteCommunicationClient.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index 96264d5eba0..0f99688fc82 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -1866,6 +1866,21 @@ GDBRemoteCommunicationClient::SendAttach
return -1;
}
+int
+GDBRemoteCommunicationClient::SendStdinNotification (const char* data, size_t data_len)
+{
+ StreamString packet;
+ packet.PutCString("I");
+ packet.PutBytesAsRawHex8(data, data_len);
+ StringExtractorGDBRemote response;
+ if (SendPacketAndWaitForResponse (packet.GetData(), packet.GetSize(), response, false) == PacketResult::Success)
+ {
+ return 0;
+ }
+ return response.GetError();
+
+}
+
const lldb_private::ArchSpec &
GDBRemoteCommunicationClient::GetHostArchitecture ()
{
OpenPOWER on IntegriCloud