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

Method create

python/mediumlevelil.py:397–407  ·  view source on GitHub ↗
(
	    cls, func: 'MediumLevelILFunction', expr_index: ExpressionIndex, instr_index: Optional[InstructionIndex] = None
	)

Source from the content-addressed store, hash-verified

395
396 @classmethod
397 def create(
398 cls, func: 'MediumLevelILFunction', expr_index: ExpressionIndex, instr_index: Optional[InstructionIndex] = None
399 ) -> 'MediumLevelILInstruction':
400 assert func.arch is not None, "Attempted to create IL instruction with function missing an Architecture"
401 inst = core.BNGetMediumLevelILByIndex(func.handle, expr_index)
402 assert inst is not None, "core.BNGetMediumLevelILByIndex returned None"
403 if instr_index is None:
404 instr_index = core.BNGetMediumLevelILInstructionForExpr(func.handle, expr_index)
405 assert instr_index is not None, "core.BNGetMediumLevelILInstructionForExpr returned None"
406 instr = CoreMediumLevelILInstruction.from_BNMediumLevelILInstruction(inst)
407 return ILInstruction[instr.operation](func, expr_index, instr, instr_index) # type: ignore
408
409 def __str__(self):
410 tokens = self.tokens

Callers 12

ssa_formMethod · 0.45
non_ssa_formMethod · 0.45
low_level_ilMethod · 0.45
llilsMethod · 0.45
high_level_ilMethod · 0.45
hlilsMethod · 0.45
expr_typeMethod · 0.45
_get_exprMethod · 0.45
_get_expr_listMethod · 0.45
__getitem__Method · 0.45
get_exprMethod · 0.45
get_expr_typeMethod · 0.45

Calls 1

Tested by

no test coverage detected