From 7a525174fd59204330690a8f9d65fe2a3046cd38 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Thu, 10 Jul 2025 01:35:51 -0400 Subject: [WARP] Add `IsInstructionComputedVariant` API Was previously not exposed, we want it for unit tests. --- plugins/warp/api/python/warp.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'plugins/warp/api/python/warp.py') diff --git a/plugins/warp/api/python/warp.py b/plugins/warp/api/python/warp.py index e0500215..c761c323 100644 --- a/plugins/warp/api/python/warp.py +++ b/plugins/warp/api/python/warp.py @@ -365,6 +365,12 @@ def is_instruction_variant(function: LowLevelILFunction, variant: LowLevelILInst def is_instruction_blacklisted(function: LowLevelILFunction, variant: LowLevelILInstruction) -> bool: return warpcore.BNWARPIsLiftedInstructionBlacklisted(function.handle, variant.instr_index) +def is_instruction_computed_variant(function: LowLevelILFunction, variant: LowLevelILInstruction) -> bool: + """ + Checks to see if the instruction is variant due to some computed value. **Must use LLIL.** + """ + return warpcore.BNWARPIsLowLevelInstructionComputedVariant(function.handle, variant.instr_index) + def get_function_guid(function: Function) -> Optional[FunctionGUID]: guid = warpcore.BNWARPUUID() if not warpcore.BNWARPGetAnalysisFunctionGUID(function.handle, guid): -- cgit v1.3.1