From f28fb80b7b49226006bbb1696c3c2bec07df891e Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Mon, 8 Aug 2022 13:57:05 -0400 Subject: implement is_thunk, closes PR #3343 --- python/lowlevelil.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'python/lowlevelil.py') diff --git a/python/lowlevelil.py b/python/lowlevelil.py index 137a2d77..74b9e104 100644 --- a/python/lowlevelil.py +++ b/python/lowlevelil.py @@ -2876,6 +2876,13 @@ class LowLevelILFunction: finally: core.BNFreeLLILVariablesList(registers) + @property + def is_thunk(self) -> bool: + """Returns True if the function starts with a Tailcall (read-only)""" + if len(self.basic_blocks) == 1: + return isinstance(self.basic_blocks[0][-1], Tailcall) + return False + @property def register_stacks(self) -> List[ILRegisterStack]: """ List of register stacks used in this IL """ -- cgit v1.3.1