angr.analyses.decompiler.edits.hooks

class angr.analyses.decompiler.edits.hooks.EditHooks

Bases: Protocol

Notifications 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)
Return type:

None

Parameters:
before_stack_var_renamed(func, offset, old_name, new_name)
Return type:

None

Parameters:
before_func_arg_renamed(func, arg_index, old_name, new_name)
Return type:

None

Parameters:
before_global_var_renamed(addr, old_name, new_name)
Return type:

None

Parameters:
before_stack_var_retyped(func, offset, old_type, new_type)
Return type:

None

Parameters:
before_func_arg_retyped(func, arg_index, old_type, new_type)
Return type:

None

Parameters:
before_global_var_retyped(addr, old_type, new_type)
Return type:

None

Parameters:
before_other_var_retyped(var, old_type, new_type)
Return type:

None

Parameters:
before_function_retyped(func, old_proto, new_proto)
Return type:

None

Parameters:
before_comment_changed(addr, old, new, created, decomp)
Return type:

None

Parameters:
__init__(*args, **kwargs)
class angr.analyses.decompiler.edits.hooks.NullEditHooks

Bases: object

A concrete no-op implementation. Subclass it so an adapter only overrides what it needs.

before_function_renamed(func, old_name, new_name)
Return type:

None

Parameters:
before_stack_var_renamed(func, offset, old_name, new_name)
Return type:

None

Parameters:
before_func_arg_renamed(func, arg_index, old_name, new_name)
Return type:

None

Parameters:
before_global_var_renamed(addr, old_name, new_name)
Return type:

None

Parameters:
before_stack_var_retyped(func, offset, old_type, new_type)
Return type:

None

Parameters:
before_func_arg_retyped(func, arg_index, old_type, new_type)
Return type:

None

Parameters:
before_global_var_retyped(addr, old_type, new_type)
Return type:

None

Parameters:
before_other_var_retyped(var, old_type, new_type)
Return type:

None

Parameters:
before_function_retyped(func, old_proto, new_proto)
Return type:

None

Parameters:
before_comment_changed(addr, old, new, created, decomp)
Return type:

None

Parameters:
angr.analyses.decompiler.edits.hooks.coerce_hooks(hooks)
Return type:

EditHooks

Parameters:

hooks (EditHooks | None)