summaryrefslogtreecommitdiff
path: root/view/sharedcache/core/VirtualMemory.h
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-04-13 00:47:36 -0400
committerMason Reed <mason@vector35.com>2025-04-14 03:20:51 -0400
commitea47d4c85e78533ea7e88adc442159414feb3f7f (patch)
tree801cd657bf7872d02cb783f8ee0f25b3f5ecad1c /view/sharedcache/core/VirtualMemory.h
parent83dc0ef0eea5face59d8a58251f78f32f3e6c914 (diff)
[SharedCache] Apply .symbols file information when applying an image
This improves symbol recovery drastically on newer shared caches Related PR: https://github.com/Vector35/binaryninja-api/pull/6210
Diffstat (limited to 'view/sharedcache/core/VirtualMemory.h')
-rw-r--r--view/sharedcache/core/VirtualMemory.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/view/sharedcache/core/VirtualMemory.h b/view/sharedcache/core/VirtualMemory.h
index 2edc6ef3..647f4468 100644
--- a/view/sharedcache/core/VirtualMemory.h
+++ b/view/sharedcache/core/VirtualMemory.h
@@ -42,8 +42,13 @@ class VirtualMemory
{
std::shared_mutex m_regionMutex;
AddressRangeMap<VirtualMemoryRegion> m_regions;
+ uint64_t m_addressSize = 8;
public:
+ explicit VirtualMemory(uint64_t addressSize = 8) : m_addressSize(addressSize) {}
+
+ uint64_t GetAddressSize() const { return m_addressSize; }
+
// At no point do we ever store a strong pointer to a file accessor, that is the job of the `FileAccessorCache`.
void MapRegion(WeakFileAccessor fileAccessor, AddressRange mappedRange, uint64_t fileOffset);