[Lldb-commits] [lldb] [lldb] Implement Process::ReadMemoryRanges (PR #163651)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 17 03:06:46 PDT 2025


================
@@ -225,3 +227,63 @@ TEST_F(MemoryTest, TesetMemoryCacheRead) {
                                                        // instead of using an
                                                        // old cache
 }
+
+/// A process class that reads `lower_byte(address)` for each `address` it
+/// reads.
+class DummyReaderProcess : public Process {
+public:
+  size_t DoReadMemory(lldb::addr_t vm_addr, void *buf, size_t size,
+                      Status &error) override {
+    uint8_t *buffer = static_cast<uint8_t *>(buf);
+    for (size_t addr = vm_addr; addr < vm_addr + size; addr++)
+      buffer[addr - vm_addr] = addr;
----------------
DavidSpickett wrote:

I would also move the comment about the lower byte to here, or repeat it.

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


More information about the lldb-commits mailing list