================
@@ -0,0 +1,46 @@
+//===-- MemoryRegionInfoCache.h ---------------------------------*- C++ 
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLDB_TARGET_MEMORYREGIONINFOCACHE_H
+#define LLDB_TARGET_MEMORYREGIONINFOCACHE_H
+
+#include "lldb/Target/MemoryRegionInfo.h"
+#include "lldb/Utility/RangeMap.h"
+
+#include <mutex>
+#include <optional>
+
+namespace lldb_private {
+class MemoryRegionInfoCache {
+public:
+  MemoryRegionInfoCache() : m_region_infos(), m_mutex() {}
+
+  /// Remove all cached entries.  Should be called whenever
+  /// Process resumes execution of the inferior.
+  void Clear();
+
+  /// Remove cached information about region containing \p addr, if any.
+  void Erase(lldb::addr_t addr, lldb::addr_t size);
----------------
JDevlieghere wrote:

Nit: Why represent the size as an addr_t? I guess not size_t because that's the 
host's, so maybe just uint64_t?
```suggestion
  void Erase(lldb::addr_t addr, size_t size);
```

https://github.com/llvm/llvm-project/pull/206208
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to