summaryrefslogtreecommitdiff
path: root/python/architecture.py
diff options
context:
space:
mode:
authorplafosse <peter@vector35.com>2016-10-31 16:06:34 -0400
committerplafosse <peter@vector35.com>2016-10-31 16:06:34 -0400
commita6842fc4209ed0bc160222ee61b2e6d9741dc9ef (patch)
treec227612ba1cf905efcf2a07bd1f3bb5829e31de9 /python/architecture.py
parent18e7e9378a4d7dff8140ed35eb47ce7993bd850b (diff)
Refactoring and other improvements of the python api
Diffstat (limited to 'python/architecture.py')
-rw-r--r--python/architecture.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/python/architecture.py b/python/architecture.py
index a8aa391b..0cdba6e5 100644
--- a/python/architecture.py
+++ b/python/architecture.py
@@ -1084,6 +1084,12 @@ class Architecture(object):
"""
return None
+ def get_associated_arch_by_address(self, addr):
+ new_addr = ctypes.c_ulonglong()
+ new_addr.value = addr
+ result = core.BNGetAssociatedArchitectureByAddress(self.handle, new_addr)
+ return Architecture(handle = result), new_addr.value
+
def get_instruction_info(self, data, addr):
"""
``get_instruction_info`` returns an InstructionInfo object for the instruction at the given virtual address