``perform_is_valid_offset`` implements a check if a virtual address ``addr`` is valid. .. note:: This method **may** be overridden by custom BinaryViews. Use :py:func:`add_auto_segment` to provide \ data without overriding this method. .. warning:: This method **must not** be called direc
(self, addr: int)
| 4050 | return ModificationStatus.Original |
| 4051 | |
| 4052 | def perform_is_valid_offset(self, addr: int) -> bool: |
| 4053 | """ |
| 4054 | ``perform_is_valid_offset`` implements a check if a virtual address ``addr`` is valid. |
| 4055 | |
| 4056 | .. note:: This method **may** be overridden by custom BinaryViews. Use :py:func:`add_auto_segment` to provide \ |
| 4057 | data without overriding this method. |
| 4058 | |
| 4059 | .. warning:: This method **must not** be called directly. |
| 4060 | |
| 4061 | :param int addr: a virtual address to be checked |
| 4062 | :return: true if the virtual address is valid, false if the virtual address is invalid or error |
| 4063 | :rtype: bool |
| 4064 | """ |
| 4065 | data = self.read(addr, 1) |
| 4066 | return (data is not None) and (len(data) == 1) |
| 4067 | |
| 4068 | def perform_is_offset_readable(self, offset: int) -> bool: |
| 4069 | """ |