angr.knowledge_plugins.variables

class angr.knowledge_plugins.variables.DecompilationVariableManager

Bases: VariableManager

Holds variables discovered during decompilation, kept separate from the disassembly-level kb.variables. Exposed as kb.dec_variables. Per-function managers are held in a SpillingVariableInternalDict, which spills least-recently-used entries to the RuntimeDb LMDB store (disable via USE_SPILLING_DVARS).

__init__(kb)
copy()
Return type:

DecompilationVariableManager

class angr.knowledge_plugins.variables.VariableManager

Bases: KnowledgeBasePlugin

Manage variables.

__init__(kb)
function_managers: dict[int, VariableManagerInternal] | SpillingVariableInternalDict
has_function_manager(key)
Return type:

bool

Parameters:

key (int)

get_function_manager(func_addr)
Return type:

VariableManagerInternal

initialize_variable_names()
Return type:

None

get_variable_accesses(variable, same_name=False)

Get a list of all references to the given variable.

Parameters:
  • variable (SimVariable) – The variable.

  • same_name (bool) – Whether to include all variables with the same variable name, or just based on the variable identifier.

Return type:

list[VariableAccess]

Returns:

All references to the variable.

copy()
static convert_variable_list(vlist, manager)
Parameters:
load_from_dwarf(cu_list=None)
Parameters:

cu_list (list[CompilationUnit] | None)

class angr.knowledge_plugins.variables.VariableType

Bases: object

Describes variable types.

REGISTER = 0
MEMORY = 1

Submodules