diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2022-08-08 13:57:05 -0400 |
|---|---|---|
| committer | Jordan Wiens <jordan@psifertex.com> | 2022-08-08 13:57:05 -0400 |
| commit | f28fb80b7b49226006bbb1696c3c2bec07df891e (patch) | |
| tree | b8589d3f62caa683241ebad1078904ac15c94fb3 /python/lowlevelil.py | |
| parent | eb5d564e7919b217b7a932fc7f9e576221e89574 (diff) | |
implement is_thunk, closes PR #3343
Diffstat (limited to 'python/lowlevelil.py')
| -rw-r--r-- | python/lowlevelil.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/python/lowlevelil.py b/python/lowlevelil.py index 137a2d77..74b9e104 100644 --- a/python/lowlevelil.py +++ b/python/lowlevelil.py @@ -2877,6 +2877,13 @@ class LowLevelILFunction: 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 """ count = ctypes.c_ulonglong() |
