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- __init__(addr_and_variables)¶
- Parameters:
addr_and_variables (list[tuple[int, SimVariable]])
- addr_and_variables
- property relocatable¶
Returns whether this annotation can be relocated in a simplification.
- Returns:
True if it can be relocated, false otherwise.
- property eliminatable¶
Returns whether this annotation can be eliminated in a simplification.
- Returns:
True if eliminatable, False otherwise
- 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)¶
- 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 annotate_with_variables(expr, addr_and_variables)¶
- property func_addr¶
- property dominance_frontiers¶
- property variable_manager¶
- 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