summaryrefslogtreecommitdiff
path: root/python/basicblock.py
diff options
context:
space:
mode:
authorXusheng <xusheng@vector35.com>2021-02-05 20:28:13 +0800
committerXusheng <xusheng@vector35.com>2021-04-22 10:52:39 +0800
commitc4b1dd712783e7474570705e6d95183a0c02a76e (patch)
tree0393986e0078cb20610c8ad091db061f8f41a08b /python/basicblock.py
parenta355d5c9aa1978d10f378931bfd5f06be60bae98 (diff)
add persistent search result
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