summaryrefslogtreecommitdiff
path: root/rust/src/binary_view
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-05-16 19:59:05 +0200
committerMason Reed <mason@vector35.com>2025-05-17 08:58:53 +0200
commitf3dce0828c95e11af1f7d23ca56be6037b86de3c (patch)
tree07c59a8e7cd7ec022580d825fbd0cb8d2dbe8888 /rust/src/binary_view
parent64706bbd526c22e38b0be34f5d2b5a75766a6c02 (diff)
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.
Diffstat (limited to 'rust/src/binary_view')
-rw-r--r--rust/src/binary_view/memory_map.rs5
1 files changed, 5 insertions, 0 deletions
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,