diff options
Diffstat (limited to 'python/__init__.py')
| -rw-r--r-- | python/__init__.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/python/__init__.py b/python/__init__.py index 847b2c06..26c8fb5d 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -1022,7 +1022,7 @@ class BinaryView(object): self.file = file_metadata self.handle = core.BNCreateCustomBinaryView(self.__class__.name, file_metadata.handle, self._cb) self.notifications = {} - self.next_address = self.entry_point + self.next_address = None # Do NOT try to access view before init() is called, use placeholder @classmethod def register(cls): @@ -1579,6 +1579,8 @@ class BinaryView(object): """ if arch is None: arch = self.arch + if self.next_address is None: + self.next_address = self.entry_point txt, size = arch.get_instruction_text(self.read(self.next_address, self.arch.max_instr_length), self.next_address) self.next_address += size if txt is None: @@ -5696,7 +5698,7 @@ class _ArchitectureMetaClass(type): class Architecture(object): """ - ``class Architecture`` is the parent class for all CPU architectures. Subclasses of Architecture implemnt assembly, + ``class Architecture`` is the parent class for all CPU architectures. Subclasses of Architecture implement assembly, disassembly, IL lifting, and patching. ``class Architecture`` has a ``__metaclass__`` with the additional methods ``register``, and supports |
