angr.analyses.decompiler.edits.hooks¶
- class angr.analyses.decompiler.edits.hooks.EditHooks¶
Bases:
ProtocolNotifications fired immediately before each mutation, while the old value is still readable from the knowledge base.
The method set mirrors angr-management’s plugin hooks one-for-one so its adapter is a pure forwarder. Firing before the mutation matches what the GUI’s own edit dialogs do, and is what lets a handler snapshot pre-edit state.
- before_function_renamed(func, old_name, new_name)¶
- before_stack_var_renamed(func, offset, old_name, new_name)¶
- before_func_arg_renamed(func, arg_index, old_name, new_name)¶
- before_global_var_renamed(addr, old_name, new_name)¶
- before_stack_var_retyped(func, offset, old_type, new_type)¶
- before_func_arg_retyped(func, arg_index, old_type, new_type)¶
- before_global_var_retyped(addr, old_type, new_type)¶
- before_other_var_retyped(var, old_type, new_type)¶
- Return type:
- Parameters:
var (SimVariable)
old_type (SimType | None)
new_type (SimType)
- before_function_retyped(func, old_proto, new_proto)¶
- Return type:
- Parameters:
func (Function)
old_proto (SimTypeFunction | None)
new_proto (SimTypeFunction)
- before_comment_changed(addr, old, new, created, decomp)¶
- __init__(*args, **kwargs)
- class angr.analyses.decompiler.edits.hooks.NullEditHooks¶
Bases:
objectA concrete no-op implementation. Subclass it so an adapter only overrides what it needs.
- before_function_renamed(func, old_name, new_name)¶
- before_stack_var_renamed(func, offset, old_name, new_name)¶
- before_func_arg_renamed(func, arg_index, old_name, new_name)¶
- before_global_var_renamed(addr, old_name, new_name)¶
- before_stack_var_retyped(func, offset, old_type, new_type)¶
- before_func_arg_retyped(func, arg_index, old_type, new_type)¶
- before_global_var_retyped(addr, old_type, new_type)¶
- before_other_var_retyped(var, old_type, new_type)¶
- Return type:
- Parameters:
var (SimVariable)
old_type (SimType | None)
new_type (SimType)
- before_function_retyped(func, old_proto, new_proto)¶
- Return type:
- Parameters:
func (Function)
old_proto (SimTypeFunction | None)
new_proto (SimTypeFunction)