MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / ILReferenceSource

Class ILReferenceSource

python/function.py:151–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149
150@dataclass
151class ILReferenceSource:
152 func: Optional['Function']
153 arch: Optional['architecture.Architecture']
154 address: int
155 il_type: FunctionGraphType
156 expr_id: ExpressionIndex
157
158 @staticmethod
159 def get_il_name(il_type: FunctionGraphType) -> str:
160 if il_type == FunctionGraphType.NormalFunctionGraph:
161 return 'disassembly'
162 if il_type == FunctionGraphType.LowLevelILFunctionGraph:
163 return 'llil'
164 if il_type == FunctionGraphType.LiftedILFunctionGraph:
165 return 'lifted_llil'
166 if il_type == FunctionGraphType.LowLevelILSSAFormFunctionGraph:
167 return 'llil_ssa'
168 if il_type == FunctionGraphType.MediumLevelILFunctionGraph:
169 return 'mlil'
170 if il_type == FunctionGraphType.MediumLevelILSSAFormFunctionGraph:
171 return 'mlil_ssa'
172 if il_type == FunctionGraphType.MappedMediumLevelILFunctionGraph:
173 return 'mapped_mlil'
174 if il_type == FunctionGraphType.MappedMediumLevelILSSAFormFunctionGraph:
175 return 'mapped_mlil_ssa'
176 if il_type == FunctionGraphType.HighLevelILFunctionGraph:
177 return 'hlil'
178 if il_type == FunctionGraphType.HighLevelILSSAFormFunctionGraph:
179 return 'hlil_ssa'
180 return ""
181
182 def __repr__(self):
183 if self.arch:
184 return f"<ref: {self.arch}@{self.address:#x}, {self.get_il_name(self.il_type)}@{self.expr_id}>"
185 else:
186 return f"<ref: {self.address:#x}, {self.get_il_name(self.il_type)}@{self.expr_id}>"
187
188
189@dataclass

Callers 4

get_mlil_var_refsMethod · 0.70
get_hlil_var_refsMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected