angr.utils.tagged_interval_map

class angr.utils.tagged_interval_map.TaggedIntervalMap

Bases: object

Catalogs features of intervals.

__init__(nbits=0)
Parameters:

nbits (int) – Number of binning bits. Higher values reduce detail. 0 for no binning.

property nbits: int
add(addr, size, tags)

Add interval starting at addr of size bytes.

When binning, intervals endpoints are aligned to 2^nbits. Gaps between added intervals are populated with implicit intervals having tag value of 0. Overlapping intervals will have tag bits OR’d together.

Adjacent intervals in the interval map have unique tags. When intervals are added to the map, any adjacent stops with identical tags will be eliminated so the map retains this property.

For example: if an interval(addr=0, size=100, tags=1) is added, followed by (100, 100, 1), the resulting interval in the map will be (0, 200, 1).

Return type:

None

Parameters:
irange(min_addr=None, max_addr=None)

Iterate over intervals intersecting [min_addr, max_addr], yielding interval (addr, size, tags) tuples. Implicit gap intervals (with tags=0) are also returned.

Parameters:
  • min_addr (int | None) – Minimum address (inclusive) to begin iterating from. If None, iterate from start of map.

  • max_addr (int | None) – Maximum address (inclusive) to iterate to. If None, iterate to end of map.

Return type:

Iterator[tuple[int, int, int]]