aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
diff options
context:
space:
mode:
authorMichał Górny <mgorny@moritz.systems>2022-08-22 18:59:08 +0200
committerMichał Górny <mgorny@moritz.systems>2022-08-23 15:49:16 +0200
commit03b8f79048bfc32ade0404df3d3931266a06dc92 (patch)
tree2b7be3e8b76ec8c7903201d862ef1350ed9fcd14 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
parent0c9b32e7dd2d3488156234cfc4278e7119635378 (diff)
downloadllvm-03b8f79048bfc32ade0404df3d3931266a06dc92.zip
llvm-03b8f79048bfc32ade0404df3d3931266a06dc92.tar.gz
llvm-03b8f79048bfc32ade0404df3d3931266a06dc92.tar.bz2
[lldb] [gdb-remote] Use Communication::WriteAll() over Write()
Replace the uses of Communication::Write() with WriteAll() to avoid partial writes. None of the call sites actually accounted for that possibility and even if it is unlikely to actually happen, there doesn't seem to be any real harm from using WriteAll() instead. Ideally, we'd remove Write() from the public API. However, that would change the API of SBCommunication. The alternative would be to alias it to WriteAll(). Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.llvm.org/D132395
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
index 34753d5..bc9ccad 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -2441,7 +2441,7 @@ GDBRemoteCommunicationServerLLGS::Handle_I(StringExtractorGDBRemote &packet) {
// remote host
ConnectionStatus status;
Status error;
- m_stdio_communication.Write(tmp, read, status, &error);
+ m_stdio_communication.WriteAll(tmp, read, status, &error);
if (error.Fail()) {
return SendErrorResponse(0x15);
}