From fae76b47b879ee8ebe06e601fcb27be607b2aed5 Mon Sep 17 00:00:00 2001 From: rihi <19492038+rihi@users.noreply.github.com> Date: Thu, 22 Feb 2024 09:50:21 +0100 Subject: [PATCH] Add check if function was decompiled --- decompiler/frontend/binaryninja/frontend.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/decompiler/frontend/binaryninja/frontend.py b/decompiler/frontend/binaryninja/frontend.py index 8064f7cf1..db2c25bea 100644 --- a/decompiler/frontend/binaryninja/frontend.py +++ b/decompiler/frontend/binaryninja/frontend.py @@ -100,7 +100,8 @@ def _get_binninja_function(self, function_identifier: object) -> binaryninja.fun if function is None: raise RuntimeError(f"BNinja frontend could not resolve function with identifier '{function_identifier}'") - # TODO: Check if function is analyzed, potentially retrying, etc... + if function.analysis_skipped: + raise RuntimeError(f"BNinja skipped function analysis for function '{function.name}' with reason '{function.analysis_skip_reason.name}'") return function