summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorBrian Potchik <brian@vector35.com>2019-11-14 19:11:42 -0500
committerBrian Potchik <brian@vector35.com>2019-11-14 19:11:42 -0500
commitbce6c88c9eb1ae1aa33ef0affdb7dbda8814cf88 (patch)
treedc1a0bf82f9ac847d55084fa65c60633b8efe536 /python
parent989600b83515dfe35494c3ffd0c6371cc5baddcf (diff)
Initial dynamic rebasing support.
Diffstat (limited to 'python')
-rw-r--r--python/binaryview.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index 2663b677..4aa245d2 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -4870,6 +4870,20 @@ class BinaryView(object):
"""
core.BNReanalyzeAllFunctions(self.handle)
+ def rebase(self, address, progress_func = None):
+ """
+ ``rebase`` rebase the binary view at the specified virtual address
+
+ :param int address: virtual address of the start of the binary view
+ :return: boolean True on success, False on failure.
+ :rtype: bool
+ """
+ if progress_func is None:
+ return core.BNRebase(self.handle, address)
+ else:
+ return core.BNRebaseWithProgress(self.handle, address, None, ctypes.CFUNCTYPE(None, ctypes.c_void_p, ctypes.c_ulonglong, ctypes.c_ulonglong)(
+ lambda ctxt, cur, total: progress_func(cur, total)))
+
def show_plain_text_report(self, title, contents):
core.BNShowPlainTextReport(self.handle, title, contents)