[Lldb-commits] [lldb] [lldb][MinidumpFileBuilder] Fix addition of MemoryList steam (PR #88564)

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 12 13:44:27 PDT 2024


================
@@ -655,9 +655,10 @@ MinidumpFileBuilder::AddMemoryList(const lldb::ProcessSP &process_sp,
     const addr_t addr = core_range.range.start();
     const addr_t size = core_range.range.size();
     auto data_up = std::make_unique<DataBufferHeap>(size, 0);
+    Status read_error;
----------------
jasonmolenda wrote:

The goal is to skip memory ranges that couldn't be read, without surfacing an error about them, right.  I don't mind it that much, but another way to be to use the existing `error` Status object (which we know is state==Success at this point), and if our memory read does fail, we could do 
```
if (error.Fail() || bytes_read == 0) {
      error.Clear();
      continue;
}
```

To make it clear that we don't want to surface a memory read failure for a region to the caller.  But this is more of a style preference I think.

https://github.com/llvm/llvm-project/pull/88564


More information about the lldb-commits mailing list