Module index

Module ida_range

Contains the definition of range_t.
A range is a non-empty continuous range of addresses (specified by its start and end addresses, the end address is excluded from the range).
Ranges are stored in the Btree part of the IDA database. To learn more about Btrees (Balanced Trees): http://www.bluerwhite.org/btree/

Global variables

var RANGE_KIND_FUNC
func_t
var RANGE_KIND_HIDDEN_RANGE
hidden_range_t
var RANGE_KIND_SEGMENT
segment_t
var RANGE_KIND_UNKNOWN
RANGE_KIND_UNKNOWN = 0

Functions

def range_t_print(*args) ‑> size_t
range_t_print(cb) -> str
Helper function. Should not be called directly!
cb: range_t const *

Classes

class array_of_rangesets (*args)
Proxy of C++ qvector< rangeset_t > class.
__init__(self) -> array_of_rangesets
__init__(self, x) -> array_of_rangesets
x: qvector< rangeset_t > const &

Methods

def add_unique(self, *args) ‑> bool
add_unique(self, x) -> bool
x: rangeset_t const &
def at(self, *args) ‑> rangeset_t const &
at(self, _idx) -> rangeset_t
_idx: size_t
def back(self)
def begin(self, *args) ‑> qvector< rangeset_t >::const_iterator
begin(self) -> rangeset_t
def capacity(self, *args) ‑> size_t
capacity(self) -> size_t
def clear(self, *args) ‑> void
clear(self)
def empty(self, *args) ‑> bool
empty(self) -> bool
def end(self, *args) ‑> qvector< rangeset_t >::const_iterator
end(self) -> rangeset_t
def erase(self, *args) ‑> qvector< rangeset_t >::iterator
erase(self, it) -> rangeset_t
it: qvector< rangeset_t >::iterator
erase(self, first, last) -> rangeset_t
first: qvector< rangeset_t >::iterator
last: qvector< rangeset_t >::iterator
def extract(self, *args) ‑> rangeset_t *
extract(self) -> rangeset_t
def find(self, *args) ‑> qvector< rangeset_t >::const_iterator
find(self, x) -> rangeset_t
x: rangeset_t const &
def front(self)
def grow(self, *args) ‑> void
grow(self, x=rangeset_t())
x: rangeset_t const &
def has(self, *args) ‑> bool
has(self, x) -> bool
x: rangeset_t const &
def inject(self, *args) ‑> void
inject(self, s, len)
s: rangeset_t *
len: size_t
def insert(self, *args) ‑> qvector< rangeset_t >::iterator
insert(self, it, x) -> rangeset_t
it: qvector< rangeset_t >::iterator
x: rangeset_t const &
def pop_back(self, *args) ‑> void
pop_back(self)
def push_back(self, *args) ‑> rangeset_t &
push_back(self, x)
x: rangeset_t const &
push_back(self) -> rangeset_t
def qclear(self, *args) ‑> void
qclear(self)
def reserve(self, *args) ‑> void
reserve(self, cnt)
cnt: size_t
def resize(self, *args) ‑> void
resize(self, _newsize, x)
_newsize: size_t
x: rangeset_t const &
resize(self, _newsize)
_newsize: size_t
def size(self, *args) ‑> size_t
size(self) -> size_t
def swap(self, *args) ‑> void
swap(self, r)
r: qvector< rangeset_t > &
def truncate(self, *args) ‑> void
truncate(self)
class range_t (*args)
Proxy of C++ range_t class.
__init__(self, ea1=0, ea2=0) -> range_t
ea1: ea_t
ea2: ea_t

Subclasses

Instance variables

var end_ea
end_ea excluded
var start_ea
start_ea included

Methods

def clear(self, *args) ‑> void
clear(self)
Set start_ea, end_ea to 0.
def compare(self, *args) ‑> int
compare(self, r) -> int
r: range_t const &
def contains(self, *args) ‑> bool
contains(self, ea) -> bool
Is every ea in 'r' also in this range_t?
ea: ea_t
contains(self, r) -> bool
r: range_t const &
def empty(self, *args) ‑> bool
empty(self) -> bool
Is the size of the range_t <= 0?
def extend(self, *args) ‑> void
extend(self, ea)
Ensure that the range_t includes 'ea'.
ea: (C++: ea_t)
def intersect(self, *args) ‑> void
intersect(self, r)
Assign the range_t to the intersection between the range_t and 'r'.
r: (C++: const range_t &) range_t const &
def overlaps(self, *args) ‑> bool
overlaps(self, r) -> bool
Is there an ea in 'r' that is also in this range_t?
r: (C++: const range_t &) range_t const &
def size(self, *args) ‑> asize_t
size(self) -> asize_t
Get end_ea - start_ea.
class rangeset_t (*args)
Proxy of C++ rangeset_t class.
__init__(self) -> rangeset_t
__init__(self, range) -> rangeset_t
range: range_t const &
__init__(self, ivs) -> rangeset_t
ivs: rangeset_t const &

Methods

def add(self, *args) ‑> bool
add(self, range) -> bool
Add each element of 'aset' to the set.
range: range_t const &
return: false if no elements were added (the set was unchanged)
add(self, start, _end) -> bool
start: ea_t
_end: ea_t
add(self, aset) -> bool
aset: rangeset_t const &
def begin(self, *args) ‑> rangeset_t::iterator
begin(self) -> range_t
Get an iterator that points to the first element in the set.
def cached_range(self, *args) ‑> range_t const *
cached_range(self) -> range_t
When searching the rangeset, we keep a cached element to help speed up searches.
return: a pointer to the cached element
def clear(self, *args) ‑> void
clear(self)
Delete all elements from the set. See qvector::clear()
def contains(self, *args) ‑> bool
contains(self, ea) -> bool
Is every element in 'aset' contained in an element of this rangeset?. See range_t::contains(range_t)
ea: ea_t
contains(self, aset) -> bool
aset: rangeset_t const &
def empty(self, *args) ‑> bool
empty(self) -> bool
Does the set have zero elements.
def end(self, *args) ‑> rangeset_t::iterator
end(self) -> range_t
Get an iterator that points to the end of the set. (This is NOT the last element)
def find_range(self, *args) ‑> range_t const *
find_range(self, ea) -> range_t
Get the element from the set that contains 'ea'.
ea: (C++: ea_t)
return: nullptr if there is no such element
def getrange(self, *args) ‑> range_t const &
getrange(self, idx) -> range_t
Get the range_t at index 'idx'.
idx: (C++: int)
def has_common(self, *args) ‑> bool
has_common(self, range) -> bool
Does any element of 'aset' overlap with an element in this rangeset?. See range_t::overlaps()
range: range_t const &
has_common(self, aset) -> bool
aset: rangeset_t const &
def includes(self, *args) ‑> bool
includes(self, range) -> bool
Is every ea in 'range' contained in the rangeset?
range: (C++: const range_t &) range_t const &
def intersect(self, *args) ‑> bool
intersect(self, aset) -> bool
Set the rangeset to its intersection with 'aset'.
aset: (C++: const rangeset_t &) rangeset_t const &
return: false if the set was unchanged
def is_equal(self, *args) ‑> bool
is_equal(self, aset) -> bool
Do this rangeset and 'aset' have identical elements?
aset: (C++: const rangeset_t &) rangeset_t const &
def is_subset_of(self, *args) ‑> bool
is_subset_of(self, aset) -> bool
Is every element in the rangeset contained in an element of 'aset'?
aset: (C++: const rangeset_t &) rangeset_t const &
def lastrange(self, *args) ‑> range_t const &
lastrange(self) -> range_t
Get the last range_t in the set.
def next_addr(self, *args) ‑> ea_t
next_addr(self, ea) -> ea_t
Get the smallest ea_t value greater than 'ea' contained in the rangeset.
ea: (C++: ea_t)
def next_range(self, *args) ‑> ea_t
next_range(self, ea) -> ea_t
Get the smallest ea_t value greater than 'ea' that is not in the same range as 'ea'.
ea: (C++: ea_t)
def nranges(self, *args) ‑> size_t
nranges(self) -> size_t
Get the number of range_t elements in the set.
def prev_addr(self, *args) ‑> ea_t
prev_addr(self, ea) -> ea_t
Get the largest ea_t value less than 'ea' contained in the rangeset.
ea: (C++: ea_t)
def prev_range(self, *args) ‑> ea_t
prev_range(self, ea) -> ea_t
Get the largest ea_t value less than 'ea' that is not in the same range as 'ea'.
ea: (C++: ea_t)
def sub(self, *args) ‑> bool
sub(self, range) -> bool
Subtract each range in 'aset' from the set
range: range_t const &
return: false if nothing was subtracted (the set was unchanged)
sub(self, ea) -> bool
ea: ea_t
sub(self, aset) -> bool
aset: rangeset_t const &
def swap(self, *args) ‑> void
swap(self, r)
Set this = 'r' and 'r' = this. See qvector::swap()
r: (C++: rangeset_t &)
class rangevec_base_t (*args)
Proxy of C++ qvector< range_t > class.
__init__(self) -> rangevec_base_t
__init__(self, x) -> rangevec_base_t
x: qvector< range_t > const &

Subclasses

Methods

def add_unique(self, *args) ‑> bool
add_unique(self, x) -> bool
x: range_t const &
def at(self, *args) ‑> range_t const &
at(self, _idx) -> range_t
_idx: size_t
def back(self)
def begin(self, *args) ‑> qvector< range_t >::const_iterator
begin(self) -> range_t
def capacity(self, *args) ‑> size_t
capacity(self) -> size_t
def clear(self, *args) ‑> void
clear(self)
def empty(self, *args) ‑> bool
empty(self) -> bool
def end(self, *args) ‑> qvector< range_t >::const_iterator
end(self) -> range_t
def erase(self, *args) ‑> qvector< range_t >::iterator
erase(self, it) -> range_t
it: qvector< range_t >::iterator
erase(self, first, last) -> range_t
first: qvector< range_t >::iterator
last: qvector< range_t >::iterator
def extract(self, *args) ‑> range_t *
extract(self) -> range_t
def find(self, *args) ‑> qvector< range_t >::const_iterator
find(self, x) -> range_t
x: range_t const &
def front(self)
def grow(self, *args) ‑> void
grow(self, x=range_t())
x: range_t const &
def has(self, *args) ‑> bool
has(self, x) -> bool
x: range_t const &
def inject(self, *args) ‑> void
inject(self, s, len)
s: range_t *
len: size_t
def insert(self, *args) ‑> qvector< range_t >::iterator
insert(self, it, x) -> range_t
it: qvector< range_t >::iterator
x: range_t const &
def pop_back(self, *args) ‑> void
pop_back(self)
def push_back(self, *args) ‑> range_t &
push_back(self, x)
x: range_t const &
push_back(self) -> range_t
def qclear(self, *args) ‑> void
qclear(self)
def reserve(self, *args) ‑> void
reserve(self, cnt)
cnt: size_t
def resize(self, *args) ‑> void
resize(self, _newsize, x)
_newsize: size_t
x: range_t const &
resize(self, _newsize)
_newsize: size_t
def size(self, *args) ‑> size_t
size(self) -> size_t
def swap(self, *args) ‑> void
swap(self, r)
r: qvector< range_t > &
def truncate(self, *args) ‑> void
truncate(self)
class rangevec_t (*args)
Proxy of C++ rangevec_t class.
__init__(self) -> rangevec_t

Ancestors

Subclasses

Inherited members