From f3dce0828c95e11af1f7d23ca56be6037b86de3c Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Fri, 16 May 2025 19:59:05 +0200 Subject: Add `BNIsMemoryMapActivated` API So that users of the memory map API can know if a view has activated the memory map and adjust behavior accordingly. --- rust/src/binary_view/memory_map.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'rust/src/binary_view') diff --git a/rust/src/binary_view/memory_map.rs b/rust/src/binary_view/memory_map.rs index 34ebd572..cedea26e 100644 --- a/rust/src/binary_view/memory_map.rs +++ b/rust/src/binary_view/memory_map.rs @@ -40,6 +40,11 @@ impl MemoryMap { unsafe { BNSetLogicalMemoryMapEnabled(self.view.handle, enabled) }; } + /// Whether the memory map is activated for the associated view. + pub fn is_activated(&self) -> bool { + unsafe { BNIsMemoryMapActivated(self.view.handle) } + } + pub fn add_binary_memory_region( &mut self, name: &str, -- cgit v1.3.1