angr.code_location

class angr.code_location.CodeLocation

Bases: Generic

Stands for a specific program point by specifying basic block address and statement ID (for IRSBs), or SimProcedure name (for SimProcedures).

__init__(block_addr, stmt_idx, sim_procedure=None, ins_addr=None, context=None, block_idx=None, **kwargs)

Constructor.

Parameters:
  • block_addr (TypeVar(BlockAddr, bound= int | None)) – Address of the block

  • stmt_idx (TypeVar(StmtIdx, bound= int | None)) – Statement ID. None for SimProcedures or if the code location is meant to refer to the entire block.

  • sim_procedure (class) – The corresponding SimProcedure class.

  • ins_addr (int | None) – The instruction address.

  • context (TypeVar(Context)) – A tuple that represents the context of this CodeLocation in contextual mode, or None in contextless mode.

  • kwargs – Optional arguments, will be stored, but not used in __eq__ or __hash__.

  • block_idx (int | None)

block_addr
stmt_idx
sim_procedure
ins_addr
context
block_idx
info: dict[str, Any] | None
property short_repr
class angr.code_location.ExternalCodeLocation

Bases: CodeLocation

Stands for a program point that originates from outside an analysis’ scope. i.e. a value loaded from rdi in a callee where the caller has not been analyzed.

call_string
class angr.code_location.AILCodeLocation

Bases: object

A code location that refers precisely to a statement of an AIL block, with an optional instruction address.

addr: int
block_idx: int | None
stmt_idx: int
insn_addr: int | None = None
static make_extern(idx)
Parameters:

idx (int)

property insn_addr_unwrap: int
property is_extern: bool
property extern_idx_unwrap: int
property extern_idx: int | None
static from_codeloc(codeloc)
Return type:

AILCodeLocation

Parameters:

codeloc (CodeLocation)

property bbl_addr
property block_addr
property ins_addr
__init__(addr, block_idx, stmt_idx, insn_addr=None)
Parameters:
  • addr (int)

  • block_idx (int | None)

  • stmt_idx (int)

  • insn_addr (int | None)

Return type:

None