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

Method get_expr

python/lowlevelil.py:3854–3867  ·  view source on GitHub ↗

``get_expr`` retrieves the IL expression at a given expression index in the function. .. warning :: Not all IL expressions are valid, even if their index is within the bounds of the function, they might not be used by the function and might not contain properly structured data.

(self, index: ExpressionIndex)

Source from the content-addressed store, hash-verified

3852 return core.BNGetLowLevelILExprCount(self.handle)
3853
3854 def get_expr(self, index: ExpressionIndex) -> Optional[LowLevelILInstruction]:
3855 """
3856 ``get_expr`` retrieves the IL expression at a given expression index in the function.
3857
3858 .. warning :: Not all IL expressions are valid, even if their index is within the bounds of the function,
3859 they might not be used by the function and might not contain properly structured data.
3860
3861 :param index: Index of desired expression in function
3862 :return: A LowLevelILInstruction object for the expression, if it exists. Otherwise, None
3863 """
3864 if index >= self.get_expr_count():
3865 return None
3866
3867 return LowLevelILInstruction.create(self, index)
3868
3869 def copy_expr(self, original: LowLevelILInstruction) -> ExpressionIndex:
3870 """

Callers 1

_get_current_il_exprFunction · 0.45

Calls 2

get_expr_countMethod · 0.95
createMethod · 0.45

Tested by

no test coverage detected