angr.analyses.decompiler.clinic¶
- class angr.analyses.decompiler.clinic.BlockCache¶
Bases:
tupleBlockCache(rd, prop)
- static __new__(_cls, rd, prop)
Create new instance of BlockCache(rd, prop)
- prop
Alias for field number 1
- rd
Alias for field number 0
- class angr.analyses.decompiler.clinic.ClinicMode¶
Bases:
EnumAnalysis mode for Clinic.
- DECOMPILE = 1¶
- COLLECT_DATA_REFS = 2¶
- class angr.analyses.decompiler.clinic.DataRefDesc¶
Bases:
objectThe fields of this class is compatible with items inside IRSB.data_refs.
- data_addr: int
- data_size: int
- block_addr: int
- stmt_idx: int
- ins_addr: int
- data_type_str: str
- class angr.analyses.decompiler.clinic.ClinicStage¶
Bases:
IntEnumDifferent stages of treating an ailment.
- INITIALIZATION = 0¶
- AIL_GRAPH_CONVERSION = 1¶
- MAKE_RETURN_SITES = 2¶
- MAKE_ARGUMENT_LIST = 3¶
- TRACK_STACK_POINTERS = 4¶
- CONSTANT_PROPAGATION = 5¶
- MAKE_CALLSITES = 6¶
- POST_CALLSITES = 7¶
- PRE_SSA_LEVEL0_FIXUPS = 8¶
- SSA_LEVEL0_TRANSFORMATION = 9¶
- PRE_SSA_LEVEL1_SIMPLIFICATIONS = 10¶
- SSA_LEVEL1_TRANSFORMATION = 11¶
- POST_SSA_LEVEL1_SIMPLIFICATIONS = 12¶
- RECOVER_VARIABLES = 13¶
- SEMANTIC_VARIABLE_NAMING = 14¶
- COLLECT_EXTERNS = 15¶
- __new__(value)
- class angr.analyses.decompiler.clinic.ComboRegReferenceWalker¶
Bases:
AILBlockRewriterRewrite references to combo registers to load from the combo register.
- __init__(project, ail_manager)¶
- class angr.analyses.decompiler.clinic.Clinic¶
Bases:
AnalysisA Clinic deals with AILments.
- __init__(func, remove_dead_memdefs=False, exception_edges=False, sp_tracker_track_memory=True, fold_expressions=True, fold_callexprs_into_conditions=False, insert_labels=True, optimization_passes=None, cfg=None, peephole_optimizations=None, must_struct=None, variable_kb=None, reset_variable_names=False, rewrite_ites_to_diamonds=True, cache=None, mode=ClinicMode.DECOMPILE, sp_shift=0, inline_functions=None, inlined_counts=None, inlining_parents=None, vvar_id_start=0, optimization_scratch=None, desired_variables=None, force_loop_single_exit=True, refine_loops_with_single_successor=False, complete_successors=False, typehoon_cls=<class 'angr.analyses.typehoon.typehoon.Typehoon'>, max_type_constraints=100000, type_constraint_set_degradation_threshold=150, ail_graph=None, arg_vvars=None, start_stage=ClinicStage.INITIALIZATION, end_stage=None, skip_stages=(), notes=None, static_vvars=None, static_buffers=None, flatten_args=False, constrain_callee_prototypes=False, semvar_naming=True, flavor='pseudocode')¶
- Parameters:
func (Function)
peephole_optimizations (None | Iterable[type[PeepholeOptimizationStmtBase] | type[PeepholeOptimizationExprBase]])
variable_kb (KnowledgeBase | None)
cache (DecompilationCache | None)
mode (ClinicMode)
sp_shift (int)
vvar_id_start (int)
force_loop_single_exit (bool)
refine_loops_with_single_successor (bool)
complete_successors (bool)
max_type_constraints (int)
type_constraint_set_degradation_threshold (int)
ail_graph (DiGraph | None)
arg_vvars (dict[int, tuple[VirtualVariable, SimVariable]] | None)
start_stage (ClinicStage | None)
end_stage (ClinicStage | None)
skip_stages (tuple[ClinicStage, ...])
notes (dict[str, DecompilationNote] | None)
static_vvars (dict | None)
static_buffers (dict | None)
constrain_callee_prototypes (bool)
semvar_naming (bool)
flavor (str)
- cc_graph: DiGraph | None
- unoptimized_graph: DiGraph | None
- arg_vvars: dict[int, tuple[VirtualVariable, SimVariable]] | None
- externs: set[SimMemoryVariable]
- data_refs: dict[int, list[DataRefDesc]]
- entry_node_addr: Address
- block(addr, size)¶
Get the converted block at the given specific address with the given size.
- dbg_repr()¶
- Returns:
- calculate_stack_depth()¶
- copy_graph(graph=None)¶
- Return type:
DiGraph
- parse_variable_addr(addr)¶
- Return type:
- Parameters:
addr (Expression)
- new_block_addr()¶
Return a block address that does not conflict with any existing blocks.
- Return type:
- Returns:
The block address.
- static remove_empty_nodes(graph)¶
- Return type:
DiGraph- Parameters:
graph (DiGraph)
- constrain_callee_prototypes()¶
Constrain the types of callee function arguments based on facts that are observed at call sites. Note that this function will change the prototypes of (callee) functions in the knowledge base, which means it may affect the decompilation output of the current function if it is decompiled again.