angr.utils.loader

angr.utils.loader.is_pc(project, ins_addr, addr)

Check if the given address is program counter (PC) or not. This function is for handling the case on some bizarre architectures where PC is always the currently executed instruction address plus a constant value.

Parameters:
  • project (Project) – An angr Project instance.

  • ins_addr (int) – The address of an instruction. We calculate PC using this instruction address.

  • addr (int) – The address to check against.

Return type:

bool

Returns:

True if the given instruction address is the PC, False otherwise.

angr.utils.loader.is_in_readonly_section(project, addr)

Check if the specified address is inside a read-only section.

Parameters:
  • project (Project) – An angr Project instance.

  • addr (int) – The address to check.

Return type:

bool

Returns:

True if the given address belongs to a read-only section, False otherwise.

angr.utils.loader.is_in_readonly_segment(project, addr)

Check if the specified address is inside a read-only segment.

Parameters:
  • project (Project) – An angr Project instance.

  • addr (int) – The address to check.

Return type:

bool

Returns:

True if the given address belongs to a read-only segment, False otherwise.