angr.knowledge_plugins.callsite_prototypes¶
- class angr.knowledge_plugins.callsite_prototypes.CallsitePrototypeKind¶
Bases:
EnumDescribes the type of a callsite prototype.
- INFERRED = 1¶
- PROPAGATED = 2¶
- MANUAL = 3¶
- class angr.knowledge_plugins.callsite_prototypes.CallsitePrototypes¶
Bases:
KnowledgeBasePluginCallsitePrototypes manages callee prototypes at call sites, per decompilation flavor. Every method takes a flavor (None: the default flavor). A non-default flavor reads its own entry of a kind at a call site, or the default flavor’s entry of that kind when it has none, like Function.get_prototype().
- __init__(kb)¶
- set_prototype(callsite_block_addr, cc, prototype, *, kind=CallsitePrototypeKind.INFERRED, manual=False, propagated=False, flavor=None)¶
- Return type:
- Parameters:
callsite_block_addr (int)
cc (SimCC)
prototype (SimTypeFunction)
kind (CallsitePrototypeKind)
manual (bool)
propagated (bool)
flavor (str | None)
- remove_prototype(callsite_block_addr, *, kind=CallsitePrototypeKind.INFERRED, flavor=None)¶
Remove the flavor’s own entry of a kind; a non-default flavor then falls back to the default one.
- Return type:
- Parameters:
callsite_block_addr (int)
kind (CallsitePrototypeKind)
flavor (str | None)
- get_cc(callsite_block_addr, *, kind=CallsitePrototypeKind.INFERRED, flavor=None)¶
- Return type:
- Parameters:
callsite_block_addr (int)
kind (CallsitePrototypeKind)
flavor (str | None)
- get_prototype(callsite_block_addr, *, kind=CallsitePrototypeKind.INFERRED, flavor=None)¶
- Return type:
- Parameters:
callsite_block_addr (int)
kind (CallsitePrototypeKind)
flavor (str | None)
- is_prototype_manual(callsite_block_addr, *, flavor=None)¶
- is_prototype_certain(callsite_block_addr, *, flavor=None)¶
- has_some_prototype(callsite_block_addr, *, flavor=None)¶
- has_prototype(callsite_block_addr, *, kind=CallsitePrototypeKind.INFERRED, flavor=None)¶
- Return type:
- Parameters:
callsite_block_addr (int)
kind (CallsitePrototypeKind)
flavor (str | None)
- has_prototype_for_flavor(callsite_block_addr, *, kind=CallsitePrototypeKind.INFERRED, flavor=None)¶
Whether the flavor has its own entry of the kind (as opposed to falling back to the default flavor’s).
- Return type:
- Parameters:
callsite_block_addr (int)
kind (CallsitePrototypeKind)
flavor (str | None)
- items(flavor=None)¶
The flavor’s own entries (no fallback).
- Return type:
Iterator[tuple[int,CallsitePrototypeKind,SimCC,SimTypeFunction]]- Parameters:
flavor (str | None)
- copy()¶