summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
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)