angr.knowledge_plugins.key_definitions.definition

class angr.knowledge_plugins.key_definitions.definition.DefinitionMatchPredicate

Bases: object

A dataclass indicating several facts which much all must match in order for a definition to match. Largely an internal class; don’t worry about this.

kind: AtomKind | type[Atom] | None = None
bbl_addr: int | None = None
ins_addr: int | None = None
variable: SimVariable | None = None
variable_manager: VariableManagerInternal | None | Literal[False] = None
stack_offset: int | None = None
reg_name: str | int | None = None
heap_offset: int | None = None
global_addr: int | None = None
tmp_idx: int | None = None
const_val: int | None = None
extern: bool | None = None
static construct(predicate=None, **kwargs)
Return type:

DefinitionMatchPredicate

Parameters:

predicate (DefinitionMatchPredicate | None)

normalize()
matches(defn)
Return type:

bool

Parameters:

defn (Definition)

__init__(kind=None, bbl_addr=None, ins_addr=None, variable=None, variable_manager=None, stack_offset=None, reg_name=None, heap_offset=None, global_addr=None, tmp_idx=None, const_val=None, extern=None)
Parameters:
Return type:

None

class angr.knowledge_plugins.key_definitions.definition.Definition

Bases: Generic

An atom definition.

Variables:
  • atom – The atom being defined.

  • codeloc – Where this definition is created in the original binary code.

  • dummy – Tell whether the definition should be considered dummy or not. During simplification by AILment, definitions marked as dummy will not be removed.

  • tags – A set of tags containing information about the definition gathered during analyses.

__init__(atom, codeloc, dummy=False, tags=None)
Parameters:
  • atom (A)

  • codeloc (CodeLoc)

  • dummy (bool)

  • tags (set[Tag] | None)

atom
codeloc
dummy
tags
property offset: int
property size: int
matches(**kwargs)

Return whether this definition has certain characteristics.

Return type:

bool