[all-commits] [llvm/llvm-project] 03b8f7: [lldb] [gdb-remote] Use Communication::WriteAll() ...
Michał Górny via All-commits
all-commits at lists.llvm.org
Tue Aug 23 06:49:53 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 03b8f79048bfc32ade0404df3d3931266a06dc92
https://github.com/llvm/llvm-project/commit/03b8f79048bfc32ade0404df3d3931266a06dc92
Author: Michał Górny <mgorny at moritz.systems>
Date: 2022-08-23 (Tue, 23 Aug 2022)
Changed paths:
M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
M lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
M lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationTest.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list