angr.analyses.variable_recovery.variable_recovery_base¶
- angr.analyses.variable_recovery.variable_recovery_base.parse_stack_pointer(sp)¶
Convert multiple supported forms of stack pointer representations into stack offsets.
- Parameters:
sp – A stack pointer representation.
- Returns:
A stack pointer offset.
- Return type:
- class angr.analyses.variable_recovery.variable_recovery_base.VariableAnnotation¶
Bases:
Annotation- relocatable = True¶
- eliminatable = False¶
- __init__(addr_and_variables)¶
- Parameters:
addr_and_variables (list[tuple[int, SimVariable]])
- addr_and_variables
- class angr.analyses.variable_recovery.variable_recovery_base.VariableRecoveryBase¶
Bases:
AnalysisThe base class for VariableRecovery and VariableRecoveryFast.
- __init__(func, max_iterations, store_live_variables, vvar_to_vvar=None, func_graph=None, entry_node_addr=None, flavor=None)¶
- property global_variable_manager: VariableManagerInternal¶
- get_variable_definitions(block_addr)¶
Get variables that are defined at the specified block.
- Parameters:
block_addr (int) – Address of the block.
- Returns:
A set of variables.
- initialize_dominance_frontiers()¶
- class angr.analyses.variable_recovery.variable_recovery_base.VariableRecoveryStateBase¶
Bases:
objectThe base abstract state for variable recovery analysis.
- __init__(block_addr, analysis, arch, func, project, *, tv_manager, stack_region=None, register_region=None, global_region=None, typevars=None, type_constraints=None, func_typevar=None, delayed_type_constraints=None, stack_offset_typevars=None)¶
- Parameters:
block_addr (int)
analysis (VariableRecoveryBase)
arch (Arch)
func (Function)
project (Project)
tv_manager (TypeVariableManager)
- arch: Arch
- stack_region: MultiValuedMemory
- register_region: MultiValuedMemory
- global_region: MultiValuedMemory
- phi_variables: dict[SimVariable, SimVariable]
- stack_offset_typevars: dict[int, TypeVariable]
- static top(bits)¶
- Return type:
BV
- static extract_variables(expr)¶
- Return type:
- Parameters:
expr (Base)
- static annotate_with_variables(expr, addr_and_variables)¶
- Return type:
TypeVar(T, bound=Base)- Parameters:
expr (T)
addr_and_variables (Iterable[tuple[int, SimVariable]])
- property func_addr¶
- property dominance_frontiers¶
- property variable_manager¶
- property global_variable_manager: VariableManagerInternal¶
- property variables¶
- get_variable_definitions(block_addr)¶
Get variables that are defined at the specified block.
- Parameters:
block_addr (int) – Address of the block.
- Returns:
A set of variables.
- add_type_constraint(constraint)¶
Add a new type constraint.
- Parameters:
constraint
- Returns:
- add_type_constraint_for_function(func_typevar, constraint)¶
Add a new type constraint for a specified function.
- Parameters:
func_typevar
constraint
- Returns:
- static downsize_region(region)¶
Get rid of unnecessary references in region so that it won’t avoid garbage collection on those referenced objects.
- Parameters:
region (
MultiValuedMemory) – A MultiValuedMemory region.- Return type:
- Returns:
None