diff options
author | Anthony Ha <anthonyha96@gmail.com> | 2024-04-18 12:24:24 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-18 12:24:24 -0700 |
commit | 22c26fa13d46e174e3d862e5f40cff06d804af0c (patch) | |
tree | 93c9f73389bac09d71f94a328194da8d88d336ca /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h | |
parent | 515269b0ac0e061731eb5546c44083bf771db4d8 (diff) | |
download | llvm-22c26fa13d46e174e3d862e5f40cff06d804af0c.zip llvm-22c26fa13d46e174e3d862e5f40cff06d804af0c.tar.gz llvm-22c26fa13d46e174e3d862e5f40cff06d804af0c.tar.bz2 |
[lldb] Skip remote PutFile when MD5 hashes equal (#88812)
This PR adds a check within `PutFile` to exit early when both local and
destination files have matching MD5 hashes. If they differ, or there is
trouble getting the hashes, the regular code path to put the file is
run.
As I needed this to talk to an `lldb-server` which runs the gdb-remote
protocol, I enabled `CalculateMD5` within `Platform/gdb-server` and also
found and fixed a parsing bug within it as well. Before this PR, the
client is incorrectly parsing the response packet containing the
checksum; after this PR, hopefully this is fixed. There is a test for
the parsing behavior included in this PR.
---------
Co-authored-by: Anthony Ha <antha@microsoft.com>
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h index bd2d3e2..4be7eb0 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h @@ -392,7 +392,7 @@ public: *command_output, // Pass nullptr if you don't want the command output const Timeout<std::micro> &timeout); - bool CalculateMD5(const FileSpec &file_spec, uint64_t &high, uint64_t &low); + bool CalculateMD5(const FileSpec &file_spec, uint64_t &low, uint64_t &high); lldb::DataBufferSP ReadRegister( lldb::tid_t tid, |