From f5ff6f5dd53dd4f812bffebbed8484655bcbc48c Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Mon, 10 Mar 2025 15:27:53 -0400 Subject: Add support for recoverable analysis abort. --- binaryninjaapi.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'binaryninjaapi.h') diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 4336febb..6b1d268e 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -5224,9 +5224,9 @@ namespace BinaryNinja { */ void UpdateAnalysis(); - /*! Abort the currently running analysis + /*! Abort analysis and suspend the workflow machine - This method should be considered non-recoverable and generally only used when shutdown is imminent after stopping. + Stops analysis and transitions the workflow machine to the Suspend state. This operation is recoverable, and the workflow machine can be re-enabled via the WorkflowMachine Enable API. */ void AbortAnalysis(); @@ -10058,6 +10058,22 @@ namespace BinaryNinja { WorkflowMachine(Ref view); WorkflowMachine(Ref function); + /*! Enable the workflow machine + + Re-enables the workflow machine if it is in the Suspend state. + \return true if the command is accepted, false otherwise. + */ + bool Enable(); + + /*! Disable the workflow machine + + Disables analysis and suspends the workflow machine, equivalent to AbortAnalysis. + This operation is recoverable and the workflow machine can be re-enabled via the Enable API. + \return true if the command is accepted, false otherwise. + */ + bool Disable(); + + std::optional QueryOverride(const std::string& activity); bool SetOverride(const std::string& activity, bool enable); bool ClearOverride(const std::string& activity); -- cgit v1.3.1