[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Mon Apr 7 10:57:45 PDT 2025
================
@@ -2233,6 +2233,40 @@ size_t Process::ReadMemoryFromInferior(addr_t addr, void *buf, size_t size,
return bytes_read;
}
+size_t Process::ReadMemoryInChunks(lldb::addr_t vm_addr, DataBufferHeap &data,
----------------
clayborg wrote:
There is no need to pass in a DataBufferHeap into this API. The API should just take the chunk size as a parameter:
```
size_t Process::ReadMemoryInChunks(lldb::addr_t vm_addr, lldb::addr_t vm_size, lldb::addr_t chunk_size, ReadMemoryChunkCallback callback);
```
Then you can create a local DataBufferHeap object in this function outside of the loop that reads the chunks, so the same buffer gets re-used.
https://github.com/llvm/llvm-project/pull/129307
More information about the lldb-commits
mailing list