From be5901611829ea635053db4a3482cb122735e013 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Sat, 28 Jun 2025 15:23:06 -0400 Subject: Python: Update IL Function repr()s --- python/lowlevelil.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'python/lowlevelil.py') diff --git a/python/lowlevelil.py b/python/lowlevelil.py index 79919efe..c9c478dd 100644 --- a/python/lowlevelil.py +++ b/python/lowlevelil.py @@ -3311,12 +3311,17 @@ class LowLevelILFunction: core.BNFreeLowLevelILFunction(self.handle) def __repr__(self): + form = "" + if self.il_form == FunctionGraphType.LiftedILFunctionGraph: + form += " lifted il" + if self.il_form == FunctionGraphType.LowLevelILSSAFormFunctionGraph: + form += " ssa form" if self.source_function is not None and self.source_function.arch is not None: - return f"<{self.__class__.__name__}: {self.source_function.arch.name}@{self.source_function.start:#x}>" + return f"<{self.__class__.__name__}{form}: {self.source_function.arch.name}@{self.source_function.start:#x}>" elif self.source_function is not None: - return f"<{self.__class__.__name__}: {self.source_function.start:#x}>" + return f"<{self.__class__.__name__}{form}: {self.source_function.start:#x}>" else: - return f"<{self.__class__.__name__}: anonymous>" + return f"<{self.__class__.__name__}{form}: anonymous>" def __len__(self): return int(core.BNGetLowLevelILInstructionCount(self.handle)) -- cgit v1.3.1