File tree Expand file tree Collapse file tree 3 files changed +26
-7
lines changed
Expand file tree Collapse file tree 3 files changed +26
-7
lines changed Original file line number Diff line number Diff line change @@ -2552,10 +2552,13 @@ def __del__(self):
25522552
25532553 def __repr__ (self ):
25542554 arch = self .source_function .arch
2555+ form = ""
2556+ if self .il_form == FunctionGraphType .HighLevelILSSAFormFunctionGraph :
2557+ form += " ssa form"
25552558 if arch :
2556- return "<hlil func: %s@%#x>" % ( arch .name , self .source_function .start )
2559+ return f"<HighLevelILFunction { form } : { arch .name } @ { self .source_function .start :#x } >"
25572560 else :
2558- return "<hlil func: %#x>" % self .source_function .start
2561+ return f"<HighLevelILFunction { form } : { self .source_function .start :#x } >"
25592562
25602563 def __eq__ (self , other ):
25612564 if not isinstance (other , self .__class__ ):
Original file line number Diff line number Diff line change @@ -3311,12 +3311,17 @@ def __del__(self):
33113311 core .BNFreeLowLevelILFunction (self .handle )
33123312
33133313 def __repr__ (self ):
3314+ form = ""
3315+ if self .il_form == FunctionGraphType .LiftedILFunctionGraph :
3316+ form += " lifted il"
3317+ if self .il_form == FunctionGraphType .LowLevelILSSAFormFunctionGraph :
3318+ form += " ssa form"
33143319 if self .source_function is not None and self .source_function .arch is not None :
3315- return f"<{ self .__class__ .__name__ } : { self .source_function .arch .name } @{ self .source_function .start :#x} >"
3320+ return f"<{ self .__class__ .__name__ } { form } : { self .source_function .arch .name } @{ self .source_function .start :#x} >"
33163321 elif self .source_function is not None :
3317- return f"<{ self .__class__ .__name__ } : { self .source_function .start :#x} >"
3322+ return f"<{ self .__class__ .__name__ } { form } : { self .source_function .start :#x} >"
33183323 else :
3319- return f"<{ self .__class__ .__name__ } : anonymous>"
3324+ return f"<{ self .__class__ .__name__ } { form } : anonymous>"
33203325
33213326 def __len__ (self ):
33223327 return int (core .BNGetLowLevelILInstructionCount (self .handle ))
Original file line number Diff line number Diff line change @@ -3283,10 +3283,21 @@ def __del__(self):
32833283
32843284 def __repr__ (self ):
32853285 arch = self .source_function .arch
3286+ form = ""
3287+ if self .il_form in [
3288+ FunctionGraphType .MappedMediumLevelILFunctionGraph ,
3289+ FunctionGraphType .MappedMediumLevelILSSAFormFunctionGraph ,
3290+ ]:
3291+ form += " mapped mlil"
3292+ if self .il_form in [
3293+ FunctionGraphType .MediumLevelILSSAFormFunctionGraph ,
3294+ FunctionGraphType .MappedMediumLevelILSSAFormFunctionGraph ,
3295+ ]:
3296+ form += " ssa form"
32863297 if arch :
3287- return f"<MediumLevelILFunction: { arch .name } @{ self .source_function .start :#x} >"
3298+ return f"<MediumLevelILFunction{ form } : { arch .name } @{ self .source_function .start :#x} >"
32883299 else :
3289- return f"<MediumLevelILFunction: { self .source_function .start :#x} >"
3300+ return f"<MediumLevelILFunction{ form } : { self .source_function .start :#x} >"
32903301
32913302 def __len__ (self ):
32923303 return int (core .BNGetMediumLevelILInstructionCount (self .handle ))
You can’t perform that action at this time.
0 commit comments