summaryrefslogtreecommitdiff
path: root/python/basicblock.py
diff options
context:
space:
mode:
authorJordan Wiens <jordan@psifertex.com>2019-05-15 21:35:36 -0700
committerJordan Wiens <jordan@psifertex.com>2019-05-15 21:35:36 -0700
commita36bf87e109485f9e056d2cd4e8f54ab320140dd (patch)
tree30a9e97a9f37bb881a82416180b041101c51680e /python/basicblock.py
parent13a793f7ad19f43ff97c058becb76182b0159452 (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/basicblock.py')
-rw-r--r--python/basicblock.py6
1 files changed, 3 insertions, 3 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):