================
@@ -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
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to