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

Method flag_condition

python/lowlevelil.py:5143–5161  ·  view source on GitHub ↗

``flag_condition`` returns a flag_condition expression for the given LowLevelILFlagCondition :param LowLevelILFlagCondition cond: Flag condition expression to retrieve :param str sem_class: Optional semantic flag class :param ILSourceLocation loc: location of returned expression :return:

(
	    self, cond: Union[str, LowLevelILFlagCondition, int],
	    sem_class: Optional['architecture.SemanticClassType'] = None, loc: Optional['ILSourceLocation'] = None
	)

Source from the content-addressed store, hash-verified

5141 return self.expr(LowLevelILOperation.LLIL_NORET, source_location=loc)
5142
5143 def flag_condition(
5144 self, cond: Union[str, LowLevelILFlagCondition, int],
5145 sem_class: Optional['architecture.SemanticClassType'] = None, loc: Optional['ILSourceLocation'] = None
5146 ) -> ExpressionIndex:
5147 """
5148 ``flag_condition`` returns a flag_condition expression for the given LowLevelILFlagCondition
5149
5150 :param LowLevelILFlagCondition cond: Flag condition expression to retrieve
5151 :param str sem_class: Optional semantic flag class
5152 :param ILSourceLocation loc: location of returned expression
5153 :return: A flag_condition expression
5154 :rtype: ExpressionIndex
5155 """
5156 if isinstance(cond, str):
5157 cond = LowLevelILFlagCondition[cond]
5158 elif isinstance(cond, LowLevelILFlagCondition):
5159 cond = cond.value
5160 class_index = self.arch.get_semantic_flag_class_index(sem_class)
5161 return self.expr(LowLevelILOperation.LLIL_FLAG_COND, cond, architecture.SemanticClassIndex(class_index), source_location=loc)
5162
5163 def flag_group(self, sem_group: 'architecture.SemanticGroupName', loc: Optional['ILSourceLocation'] = None) -> ExpressionIndex:
5164 """

Callers 2

copy_expr_toMethod · 0.80
M6502Class · 0.80

Calls 2

exprMethod · 0.95

Tested by

no test coverage detected