summaryrefslogtreecommitdiff
path: root/python/basicblock.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/basicblock.py')
-rw-r--r--python/basicblock.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/python/basicblock.py b/python/basicblock.py
index 9882bd42..643a60c3 100644
--- a/python/basicblock.py
+++ b/python/basicblock.py
@@ -519,3 +519,8 @@ class BasicBlock(object):
if isinstance(color, HighlightStandardColor):
color = highlight.HighlightColor(color)
core.BNSetUserBasicBlockHighlight(self.handle, color._get_core_struct())
+
+ def get_instruction_containing_address(addr):
+ start = ctypes.c_uint64()
+ ret = core.BNGetBasicBlockInstructionContainingAddress(self.handle, addr, start)
+ return ret, start.value