From a36bf87e109485f9e056d2cd4e8f54ab320140dd Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Wed, 15 May 2019 21:35:36 -0700 Subject: two bugs for the refactor -- arch has a caching getter that must be use for basicblock and a typo in function.py --- python/basicblock.py | 6 +++--- python/function.py | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'python') diff --git a/python/basicblock.py b/python/basicblock.py index 14784c81..23827f9f 100644 --- a/python/basicblock.py +++ b/python/basicblock.py @@ -134,7 +134,7 @@ class BasicBlock(object): return int(core.BNGetBasicBlockLength(self.handle)) def __repr__(self): - arch = self._arch + arch = self.arch if arch: return "" % (arch.name, self.start, self.end) else: @@ -145,7 +145,7 @@ class BasicBlock(object): # don't and instruction start cache the object is likely ephemeral idx = self.start while idx < self.end: - data = self._view.read(idx, min(self._arch.max_instr_length, self.end - idx)) + data = self._view.read(idx, min(self.arch.max_instr_length, self.end - idx)) inst_text = self.arch.get_instruction_text(data, idx) if inst_text[1] == 0: break @@ -387,7 +387,7 @@ class BasicBlock(object): @property def annotations(self): """List of automatic annotations for the start of this block (read-only)""" - return self.function.get_block_annotations(self.start, self._arch) + return self.function.get_block_annotations(self.start, self.arch) @property def disassembly_text(self): diff --git a/python/function.py b/python/function.py index 9e018758..80e18250 100644 --- a/python/function.py +++ b/python/function.py @@ -58,14 +58,14 @@ class LookupTableEntry(object): self._from_values = value @property - def to_values(self): + def to_value(self): """ """ - return self._to_values + return self._to_value - @to_values.setter - def to_values(self, value): + @to_value.setter + def to_value(self, value): """ """ - self._to_values = value + self._to_value = value class RegisterValue(object): -- cgit v1.3.1