From a6842fc4209ed0bc160222ee61b2e6d9741dc9ef Mon Sep 17 00:00:00 2001 From: plafosse Date: Mon, 31 Oct 2016 16:06:34 -0400 Subject: Refactoring and other improvements of the python api --- python/architecture.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'python/architecture.py') 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 -- cgit v1.3.1