angr.analyses.decompiler.expression_narrower¶
- class angr.analyses.decompiler.expression_narrower.ExprNarrowingInfo¶
Bases:
objectStores the analysis result of _narrowing_needed().
- __init__(narrowable, to_size=None, use_exprs=None, phi_vars=None)¶
- Parameters:
narrowable (bool)
to_size (int | None)
use_exprs (list[tuple[VirtualVariable, AILCodeLocation]] | None)
phi_vars (set[VirtualVariable] | None)
- narrowable
- to_size
- use_exprs
- phi_vars
- class angr.analyses.decompiler.expression_narrower.EffectiveSizeExtractor¶
Bases:
AILBlockWalker[None,None,None]Walks a statement or an expression and extracts the effective size (in bits).
For example, for target expression rax, (rax & 0xff) + 0x1 means the effective size of rax is 8 bits, from bit 0 to bit 7. We record this information in expr_to_effective_bits as {rax: (0, 8)}.
We pay special consideration to expressions that are used as Call arguments, as they may have been converted to a smaller size because the Call argument needs that size, but the Call prototype may have been incorrectly inferred.
- __init__(target_expr, ignore_call_args=True)¶
- Parameters:
target_expr (Expression)
ignore_call_args (bool)
- expr_to_effective_bits: dict[Expression, tuple[int, int]]
- expr_used_as_insert_base: bool
- class angr.analyses.decompiler.expression_narrower.ExpressionNarrower¶
Bases:
AILBlockRewriterNarrows an expression regardless of whether the expression is a definition or a use.
- __init__(project, rd, manager, narrowables, addr2blocks, new_blocks)¶
- replacement_core_vvars: dict[int, list[VirtualVariable]]