angr.knowledge_plugins.debug_variables¶
- class angr.knowledge_plugins.debug_variables.DebugVariableContainer¶
Bases:
objectVariable tree for variables with same name to lock up which variable is visible at a given program counter address.
- __init__()¶
It is recommended to use DebugVariableManager.add_variable() instead
- class angr.knowledge_plugins.debug_variables.DebugVariable¶
Bases:
DebugVariableContainer- Variables:
low_pc – Start of the visibility scope of the variable as program counter address (rebased)
high_pc – End of the visibility scope of the variable as program counter address (rebased)
cle_variable – Original variable from cle
- __init__(low_pc, high_pc, cle_variable)¶
It is recommended to use DebugVariableManager.add_variable() instead
- contains(dvar)¶
- Return type:
- Parameters:
dvar (DebugVariable)
- test_unsupported_overlap(dvar)¶
Test for an unsupported overlapping
- Parameters:
dvar (
DebugVariable) – Second DebugVariable to compare with- Return type:
- Returns:
True if there is an unsupported overlapping
- class angr.knowledge_plugins.debug_variables.DebugVariableManager¶
Bases:
KnowledgeBasePluginStructure to manage and access variables with different visibility scopes.
- __init__(kb)¶
- Parameters:
kb (KnowledgeBase)
- from_name_and_pc(var_name, pc_addr)¶
Get a variable from its string in the scope of pc.
- from_name(var_name)¶
Get the variable container for all variables named var_name
- Parameters:
var_name (
str) – name for a variable- Return type:
- add_variable(cle_var, low_pc, high_pc)¶
Add/load a variable
- add_variable_list(vlist, low_pc, high_pc)¶
Add all variables in a list with the same visibility range
- load_from_dwarf(elf_object=None, cu=None)¶
Automatically load all variables (global/local) from the DWARF debugging info
- Parameters:
elf_object (
ELF) – Optional, when only one elf object should be considered (e.g. p.loader.main_object)cu (
CompilationUnit) – Optional, when only one compilation unit should be considered