summaryrefslogtreecommitdiff
path: root/python/basicblock.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/basicblock.py')
-rw-r--r--python/basicblock.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/python/basicblock.py b/python/basicblock.py
index 623cc3ed..872e44b8 100644
--- a/python/basicblock.py
+++ b/python/basicblock.py
@@ -129,6 +129,9 @@ class BasicBlock:
data = self.view.read(start, length)
return self.arch.get_instruction_text(data, start)
+ def __contains__(self, i:int):
+ return i >= self.start and i < self.end
+
def _buildStartCache(self) -> None:
if self._instStarts is None:
# build the instruction start cache