angr.rustylib¶
- class angr.rustylib.Segment
Bases:
object- classmethod __new__(*args, **kwargs)¶
- copy()¶
- end¶
- size¶
- sort¶
- start¶
- class angr.rustylib.SegmentList
Bases:
objectShould be called a SegmentMap!
- classmethod __new__(*args, **kwargs)¶
- copy()¶
- has_blocks¶
- is_occupied(address)¶
- next_free_pos(address)¶
- next_pos_with_sort_not_in(address, sorts, max_distance=None)¶
Returns the next occupied position that is not in the given set of sorts.
- occupied_by(address)¶
- occupied_by_sort(address)¶
- occupied_size¶
- occupy(address, size, sort)¶
- release(address, size)¶
- search(addr)¶
Checks which segment that the address addr should belong to, and returns the offset of that segment. Note that the address may not actually belong to the block.
This is O(n): an index into the map cannot be computed any faster. Prefer the point-query methods (occupied_by, occupied_by_sort, …) wherever an index is not strictly needed.
- sort_ratio_backwards(addr, window_size, sort)¶
The fraction of bytes belonging to segments of sort sort, among the last window_size occupied bytes at or before addr.
The walk starts at the segment search() would return for addr and moves backwards, skipping over gaps, until window_size bytes have been covered. Returns 0.0 when the starting segment has a different sort, or when fewer than window_size occupied bytes are available.
- update(other)¶