diff options
| author | Brian Potchik <brian@vector35.com> | 2025-11-23 20:23:44 -0500 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2025-11-23 20:23:44 -0500 |
| commit | ccd33ad78bb48bc22068e8c8ec4b1b4b11664617 (patch) | |
| tree | 3a89fd90d1e46c77fd677ec0c93cc464e04e57cd /python | |
| parent | cd6747223935581ae422a9825a389d89f329b5fd (diff) | |
Add IsOffsetReadOnlySemantics API.
Diffstat (limited to 'python')
| -rw-r--r-- | python/binaryview.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/python/binaryview.py b/python/binaryview.py index 4170302b..637868b3 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -4996,6 +4996,18 @@ class BinaryView: """ return core.BNIsOffsetWritableSemantics(self.handle, addr) + def is_offset_readonly_semantics(self, addr: int) -> bool: + """ + ``is_offset_readonly_semantics`` checks if a virtual address ``addr`` is semantically read-only. This considers + both section semantics and segment permissions to determine if an address should be treated as read-only for + analysis purposes. + + :param int addr: a virtual address to be checked + :return: True if the virtual address is semantically read-only, False otherwise + :rtype: bool + """ + return core.BNIsOffsetReadOnlySemantics(self.handle, addr) + def save(self, dest: Union['fileaccessor.FileAccessor', str]) -> bool: """ ``save`` saves the original binary file to the provided destination ``dest`` along with any modifications. |
