angr.utils.ssa¶
- class angr.utils.ssa.AILWhitelistExprTypeWalker¶
Bases:
AILBlockViewerWalks an AIL expression or statement and determines if it is built only out of a whitelisted set of expression types.
has_nonwhitelisted_exprsis set to True as soon as any expression whose type is not in the whitelist is encountered.Note that the whitelist must include the operator/container types that the walker recurses through (e.g. BinaryOp, UnaryOp), otherwise those nodes would be flagged as non-whitelisted.
- class angr.utils.ssa.VVarUsesCollector
Bases:
AILBlockViewerCollect all uses of virtual variables and their use locations in an AIL block. Skip collecting use locations if block is not specified.
- __init__()
- vvar_and_uselocs: dict[int, list[tuple[VirtualVariable, AILCodeLocation]]]
- angr.utils.ssa.check_in_between_stmts(graph, blocks, defloc, useloc, predicate)¶
- Parameters:
graph (DiGraph)
defloc (AILCodeLocation)
useloc (AILCodeLocation)
predicate (Callable)
- angr.utils.ssa.get_tmp_deflocs(blocks)¶
- angr.utils.ssa.get_tmp_uselocs(blocks)¶
- angr.utils.ssa.get_vvar_deflocs(blocks, phi_vvars=None, check_extra_defs=True)¶
- Return type:
- Parameters:
- angr.utils.ssa.get_vvar_uselocs(blocks)¶
- Return type:
- angr.utils.ssa.has_call_in_between_stmts(graph, blocks, defloc, useloc, skip_if_contains_vvar=None)¶
- Return type:
- Parameters:
graph (DiGraph)
defloc (AILCodeLocation)
useloc (AILCodeLocation)
skip_if_contains_vvar (int | None)
- angr.utils.ssa.has_ite_expr(expr)¶
- Return type:
- Parameters:
expr (Expression)
- angr.utils.ssa.has_load_expr_in_between_stmts(graph, blocks, defloc, useloc, skip_if_contains_vvar=None)¶
- Return type:
- Parameters:
graph (DiGraph)
defloc (AILCodeLocation)
useloc (AILCodeLocation)
skip_if_contains_vvar (int | None)
- angr.utils.ssa.has_store_stmt_in_between_stmts(graph, blocks, defloc, useloc)¶
- Return type:
- Parameters:
graph (DiGraph)
defloc (AILCodeLocation)
useloc (AILCodeLocation)
- angr.utils.ssa.is_const_and_vvar_assignment(stmt, walker_cached=None)¶
- Return type:
- Parameters:
stmt (Statement)
walker_cached (AILWhitelistExprTypeWalker | None)
- angr.utils.ssa.is_const_assignment(stmt, only_consts=False)¶
- angr.utils.ssa.is_const_vvar_load_assignment(stmt, walker_cached=None)¶
- Return type:
- Parameters:
stmt (Statement)
walker_cached (AILWhitelistExprTypeWalker | None)
- angr.utils.ssa.is_const_vvar_load_dirty_assignment(stmt, walker_cached=None)¶
- Return type:
- Parameters:
stmt (Statement)
walker_cached (AILWhitelistExprTypeWalker | None)
- angr.utils.ssa.is_vvar_eliminatable(vvar, def_stmt)¶
- Return type:
- Parameters:
vvar (VirtualVariable)
def_stmt (Statement | None)
Submodules
Combined walker that collects VVar uses + Tmp uses in a single pass. |
|