From 072c5cd6eee7af9671e6c4fe583e77bc3bcbdd1d Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Tue, 14 Apr 2020 21:25:41 -0400 Subject: Add IL support to linear view --- python/function.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'python/function.py') diff --git a/python/function.py b/python/function.py index bdd04590..7cee467c 100644 --- a/python/function.py +++ b/python/function.py @@ -1214,11 +1214,21 @@ class Function(object): """returns LowLevelILFunction used to represent Function low level IL (read-only)""" return binaryninja.lowlevelil.LowLevelILFunction(self.arch, core.BNGetFunctionLowLevelIL(self.handle), self) + @property + def llil_if_available(self): + """returns LowLevelILFunction used to represent Function low level IL, or None if not loaded (read-only)""" + return binaryninja.lowlevelil.LowLevelILFunction(self.arch, core.BNGetFunctionLowLevelILIfAvailable(self.handle), self) + @property def lifted_il(self): """returns LowLevelILFunction used to represent lifted IL (read-only)""" return binaryninja.lowlevelil.LowLevelILFunction(self.arch, core.BNGetFunctionLiftedIL(self.handle), self) + @property + def lifted_il_if_available(self): + """returns LowLevelILFunction used to represent lifted IL, or None if not loaded (read-only)""" + return binaryninja.lowlevelil.LowLevelILFunction(self.arch, core.BNGetFunctionLiftedILIfAvailable(self.handle), self) + @property def medium_level_il(self): """Deprecated property provided for compatibility. Use mlil instead.""" @@ -1229,6 +1239,11 @@ class Function(object): """Function medium level IL (read-only)""" return binaryninja.mediumlevelil.MediumLevelILFunction(self.arch, core.BNGetFunctionMediumLevelIL(self.handle), self) + @property + def mlil_if_available(self): + """Function medium level IL, or None if not loaded (read-only)""" + return binaryninja.mediumlevelil.MediumLevelILFunction(self.arch, core.BNGetFunctionMediumLevelILIfAvailable(self.handle), self) + @property def function_type(self): """Function type object, can be set with either a string representing the function prototype (`str(function)` shows examples) or a :py:class:`Type` object""" -- cgit v1.3.1