summaryrefslogtreecommitdiff
path: root/python/function.py
diff options
context:
space:
mode:
authorRusty Wagner <rusty@vector35.com>2018-02-26 22:37:19 -0500
committerRusty Wagner <rusty@vector35.com>2018-02-26 23:04:10 -0500
commit105fb2549bd8fc0e19907fefff1168322dee3bb3 (patch)
tree0f00c3846356f142804e65c458f47bbf51a4dad4 /python/function.py
parentbfce40850be6f6df4138d717798d4d0d35865908 (diff)
Architecture plugins no longer need to override the perform_* methods (you can now override get_instruction_info, not perform_get_instruction_info). The perform_* methods are now deprecated but will still function as expected. Added architecture hooks to Python API using this new style.
Diffstat (limited to 'python/function.py')
-rw-r--r--python/function.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/function.py b/python/function.py
index 39ace7c6..f68aa76f 100644
--- a/python/function.py
+++ b/python/function.py
@@ -419,7 +419,7 @@ class Function(object):
arch = core.BNGetFunctionArchitecture(self.handle)
if arch is None:
return None
- self._arch = architecture.Architecture(arch)
+ self._arch = architecture.CoreArchitecture(arch)
return self._arch
@property
@@ -557,7 +557,7 @@ class Function(object):
branches = core.BNGetIndirectBranches(self.handle, count)
result = []
for i in xrange(0, count.value):
- result.append(IndirectBranchInfo(architecture.Architecture(branches[i].sourceArch), branches[i].sourceAddr, architecture.Architecture(branches[i].destArch), branches[i].destAddr, branches[i].autoDefined))
+ result.append(IndirectBranchInfo(architecture.CoreArchitecture(branches[i].sourceArch), branches[i].sourceAddr, architecture.Architecture(branches[i].destArch), branches[i].destAddr, branches[i].autoDefined))
core.BNFreeIndirectBranchList(branches)
return result
@@ -1115,7 +1115,7 @@ class Function(object):
branches = core.BNGetIndirectBranchesAt(self.handle, arch.handle, addr, count)
result = []
for i in xrange(0, count.value):
- result.append(IndirectBranchInfo(architecture.Architecture(branches[i].sourceArch), branches[i].sourceAddr, architecture.Architecture(branches[i].destArch), branches[i].destAddr, branches[i].autoDefined))
+ result.append(IndirectBranchInfo(architecture.CoreArchitecture(branches[i].sourceArch), branches[i].sourceAddr, architecture.Architecture(branches[i].destArch), branches[i].destAddr, branches[i].autoDefined))
core.BNFreeIndirectBranchList(branches)
return result
@@ -1633,7 +1633,7 @@ class FunctionGraphBlock(object):
arch = core.BNGetFunctionGraphBlockArchitecture(self.handle)
if arch is None:
return None
- return architecture.Architecture(arch)
+ return architecture.CoreArchitecture(arch)
@property
def start(self):