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. --- python/binaryview.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'python/binaryview.py') diff --git a/python/binaryview.py b/python/binaryview.py index ccd4fba3..00188902 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -2381,6 +2381,11 @@ class MemoryMap: """ core.BNSetLogicalMemoryMapEnabled(self.handle, enabled) + @property + def is_activated(self): + """Whether the memory map is activated for the associated view.""" + return core.BNIsMemoryMapActivated(self.handle) + def add_memory_region(self, name: str, start: int, source: Union['os.PathLike', str, bytes, bytearray, 'BinaryView', 'databuffer.DataBuffer', 'fileaccessor.FileAccessor'], flags: SegmentFlag = 0) -> bool: """ Adds a memory region to the memory map. Depending on the source parameter, the memory region is created as one of the following types: -- cgit v1.3.1