[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 2 03:35:01 PDT 2024
================
@@ -2526,28 +2526,16 @@ GDBRemoteCommunicationServerLLGS::Handle_memory_read(
size_t bytes_read = 0;
Status error = m_current_process->ReadMemoryWithoutTrap(
read_addr, &buf[0], byte_count, bytes_read);
- if (error.Fail()) {
- LLDB_LOGF(log,
- "GDBRemoteCommunicationServerLLGS::%s pid %" PRIu64
- " mem 0x%" PRIx64 ": failed to read. Error: %s",
- __FUNCTION__, m_current_process->GetID(), read_addr,
- error.AsCString());
+ LLDB_LOG(log, "ReadMemoryWithoutTrap({0}) read {1}/{2} bytes (error: {3})",
+ read_addr, byte_count, bytes_read, error);
+ if (bytes_read == 0)
----------------
labath wrote:
Expanded the wording. I'm not sure what you meant with the second part. `error` is the result of the `ReadMemoryWithoutTrap` call (line 2527).
https://github.com/llvm/llvm-project/pull/106532
More information about the lldb-commits
mailing list