( cls, func: 'HighLevelILFunction', expr_index: ExpressionIndex, as_ast: bool = True, instr_index: Optional[InstructionIndex] = None )
| 321 | |
| 322 | @classmethod |
| 323 | def create( |
| 324 | cls, func: 'HighLevelILFunction', expr_index: ExpressionIndex, as_ast: bool = True, |
| 325 | instr_index: Optional[InstructionIndex] = None |
| 326 | ) -> 'HighLevelILInstruction': |
| 327 | assert func.arch is not None, "Attempted to create IL instruction with function missing an Architecture" |
| 328 | instr = core.BNGetHighLevelILByIndex(func.handle, expr_index, as_ast) |
| 329 | assert instr is not None, "core.BNGetHighLevelILByIndex returned None" |
| 330 | core_instr = CoreHighLevelILInstruction.from_BNHighLevelILInstruction(instr) |
| 331 | if instr_index is None: |
| 332 | instr_index = core.BNGetHighLevelILInstructionForExpr(func.handle, expr_index) |
| 333 | assert instr_index is not None, "core.BNGetHighLevelILInstructionForExpr returned None" |
| 334 | return ILInstruction[instr.operation](func, expr_index, core_instr, as_ast, instr_index) |
| 335 | |
| 336 | def __str__(self): |
| 337 | settings = function.DisassemblySettings.default_settings() |
no test coverage detected