summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorXusheng <xusheng@vector35.com>2024-08-08 16:57:59 +0800
committerXusheng <xusheng@vector35.com>2024-08-13 15:17:23 +0800
commit2e31fd204efbbb035981088a5cb7d3890034b98a (patch)
tree4ce89b4bc8a32829081df633fe4679a434c4db51 /python
parentc6623fa5f2682f506d2d399d1b12547a195565f7 (diff)
Add a way to disable function analysis update and use it to supress analysis update during debugger launch
Diffstat (limited to 'python')
-rw-r--r--python/binaryview.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index cb067db6..960476d6 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -4599,6 +4599,27 @@ class BinaryView:
"""
core.BNSetAnalysisHold(self.handle, enable)
+ def get_function_analysis_update_disabled(self) -> bool:
+ """
+ Returns True when functions are prevented from being marked as updates required, False otherwise.
+ :return:
+ """
+ return core.BNGetFunctionAnalysisUpdateDisabled(self.handle)
+
+ def set_function_analysis_update_disabled(self, disabled: bool) -> None:
+ """
+ ``set_function_analysis_update_disabled`` prevents any function from being marked as updates required, so that
+ they would NOT be re-analyzed when the analysis is updated. The main difference between this API and
+ ``set_analysis_hold`` is that ``set_analysis_hold`` only temporarily holds the analysis, and the functions
+ are still arranged to be updated when the hold is turned off. However, with
+ ``set_function_analysis_update_disabled``, functions would not be put into the analysis queue at all.
+
+ Use with caution -- in most cases, this is NOT what you want, and you should use ``set_analysis_hold`` instead.
+ :param disabled:
+ :return:
+ """
+ core.BNSetFunctionAnalysisUpdateDisabled(self.handle, disabled)
+
def update_analysis(self) -> None:
"""
``update_analysis`` asynchronously starts the analysis running and returns immediately.