[Lldb-commits] [lldb] [lldb] Add a MemoryRegionInfo cache at a process stop (PR #202509)

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 22 01:00:03 PDT 2026


================
@@ -2696,8 +2699,11 @@ addr_t Process::AllocateMemory(size_t size, uint32_t permissions,
         "cannot allocate memory while process is running");
     return LLDB_INVALID_ADDRESS;
   }
+  addr_t alloced_addr =
+      m_allocated_memory_cache.AllocateMemory(size, permissions, error);
+  m_memory_region_info_cache.Flush(alloced_addr, size);
----------------
jasonmolenda wrote:

I'd need to construct a more synthetic test to exercise this; it requires us to have fetched a memory region for a region that we get handed back by debugserver's memory-allocation packet.  e.g. a big block of "unmapped memory", then we allocate a page in the middle, and now that unmapped memory region info is inaccurate.

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


More information about the lldb-commits mailing list