diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2019-05-15 21:35:36 -0700 |
|---|---|---|
| committer | Jordan Wiens <jordan@psifertex.com> | 2019-05-15 21:35:36 -0700 |
| commit | a36bf87e109485f9e056d2cd4e8f54ab320140dd (patch) | |
| tree | 30a9e97a9f37bb881a82416180b041101c51680e /python | |
| parent | 13a793f7ad19f43ff97c058becb76182b0159452 (diff) | |
two bugs for the refactor -- arch has a caching getter that must be use for basicblock and a typo in function.py
Diffstat (limited to 'python')
| -rw-r--r-- | python/basicblock.py | 6 | ||||
| -rw-r--r-- | python/function.py | 10 |
2 files changed, 8 insertions, 8 deletions
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 "<block: %s@%#x-%#x>" % (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): |
