From 4559573522332364873709280012593875935285 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Tue, 10 Jun 2025 01:37:39 -0400 Subject: Expose Function::CheckForDebugReport --- python/function.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'python/function.py') diff --git a/python/function.py b/python/function.py index ccecb992..d571bc55 100644 --- a/python/function.py +++ b/python/function.py @@ -3040,6 +3040,22 @@ class Function: core.BNRequestFunctionDebugReport(self.handle, name) self.view.update_analysis() + def check_for_debug_report(self, name: str) -> bool: + """ + ``check_for_debug_report`` checks if a function has had a debug report requested + with the given name, and then, if one has been requested, clears the request internally + so that future calls to this function for that report will return False. + + If a function has had a debug report requested, it is the caller of this function's + responsibility to actually generate and show the debug report. + You can use :py:func:`binaryninja.interaction.show_report_collection` + for showing a debug report from a workflow activity. + + :param name: Name of the debug report + :return: True if the report has been requested (and not checked for yet) + """ + return core.BNFunctionCheckForDebugReport(self.handle, name) + @property def call_sites(self) -> List['binaryview.ReferenceSource']: """ -- cgit v1.3.1