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

Method expr

python/lowlevelil.py:3805–3839  ·  view source on GitHub ↗
(
	    self, operation, a: ExpressionIndex = 0, b: ExpressionIndex = 0, c: ExpressionIndex = 0, d: ExpressionIndex = 0, size: int = 0,
	    flags: Optional[Union['architecture.FlagWriteTypeName', 'architecture.FlagType', 'architecture.FlagIndex', int]] = None,
	    source_location: Optional['ILSourceLocation'] = None
	)

Source from the content-addressed store, hash-verified

3803 core.BNLowLevelILSetIndirectBranches(self.handle, branch_list, len(branches))
3804
3805 def expr(
3806 self, operation, a: ExpressionIndex = 0, b: ExpressionIndex = 0, c: ExpressionIndex = 0, d: ExpressionIndex = 0, size: int = 0,
3807 flags: Optional[Union['architecture.FlagWriteTypeName', 'architecture.FlagType', 'architecture.FlagIndex', int]] = None,
3808 source_location: Optional['ILSourceLocation'] = None
3809 ) -> ExpressionIndex:
3810 _flags = architecture.FlagIndex(0)
3811 if isinstance(operation, str):
3812 operation = LowLevelILOperation[operation]
3813 elif isinstance(operation, LowLevelILOperation):
3814 operation = operation.value
3815 if isinstance(flags, str):
3816 _flags = self.arch.get_flag_write_type_by_name(architecture.FlagWriteTypeName(flags))
3817 elif isinstance(flags, ILFlag):
3818 _flags = flags.index
3819 elif isinstance(flags, int):
3820 _flags = architecture.FlagIndex(flags)
3821 elif flags is None:
3822 _flags = architecture.FlagIndex(0)
3823 else:
3824 assert False, "flags type unsupported"
3825 if source_location is not None:
3826 return ExpressionIndex(core.BNLowLevelILAddExprWithLocation(
3827 self.handle,
3828 source_location.address,
3829 source_location.source_operand,
3830 operation,
3831 size,
3832 _flags,
3833 a,
3834 b,
3835 c,
3836 d
3837 ))
3838 else:
3839 return ExpressionIndex(core.BNLowLevelILAddExpr(self.handle, operation, size, _flags, a, b, c, d))
3840
3841 def get_expr_count(self) -> int:
3842 """

Callers 15

copy_exprMethod · 0.95
nopMethod · 0.95
set_regMethod · 0.95
set_reg_splitMethod · 0.95
reg_stack_pushMethod · 0.95
set_flagMethod · 0.95
loadMethod · 0.95
storeMethod · 0.95
pushMethod · 0.95
popMethod · 0.95
regMethod · 0.95

Calls 1

Tested by 1

test_bitMethod · 0.76