From 2e31fd204efbbb035981088a5cb7d3890034b98a Mon Sep 17 00:00:00 2001 From: Xusheng Date: Thu, 8 Aug 2024 16:57:59 +0800 Subject: Add a way to disable function analysis update and use it to supress analysis update during debugger launch --- python/binaryview.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'python/binaryview.py') 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. -- cgit v1.3.1