IDA C++ SDK 9.2
Loading...
Searching...
No Matches
range.hpp File Reference

Contains the definition of range_t. More...

Go to the source code of this file.

Classes

struct  range_t
 Base class for an range. More...
struct  rangevec_t
 Vector of range_t instances. More...
struct  range64_t
struct  range64vec_t

Typedefs

typedef qvector< range_trangevec_base_t
typedef qvector< rangeset_t > array_of_rangesets
 Array of rangeset_t objects.
typedef qvector< const rangeset_t * > rangeset_crefvec_t

Enumerations

enum  range_kind_t { RANGE_KIND_UNKNOWN , RANGE_KIND_FUNC , RANGE_KIND_SEGMENT , RANGE_KIND_HIDDEN_RANGE }

Functions

idaman size_t ida_export range_t_print (const range_t *cb, char *buf, size_t bufsize)
 Helper function. Should not be called directly!
 DECLARE_TYPE_AS_MOVABLE (range_t)
 RANGESET_HELPER_DEFINITIONS (idaman) class rangeset_t
 An ordered set of non-overlapping address ranges.
 DECLARE_TYPE_AS_MOVABLE (rangeset_t)
 DECLARE_TYPE_AS_MOVABLE (range64_t)

Detailed Description

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/

Typedef Documentation

◆ rangevec_base_t

◆ array_of_rangesets

typedef qvector<rangeset_t> array_of_rangesets

Array of rangeset_t objects.

◆ rangeset_crefvec_t

typedef qvector<const rangeset_t*> rangeset_crefvec_t

Enumeration Type Documentation

◆ range_kind_t

Enumerator
RANGE_KIND_UNKNOWN 
RANGE_KIND_FUNC 

func_t

RANGE_KIND_SEGMENT 

segment_t

RANGE_KIND_HIDDEN_RANGE 

hidden_range_t

Function Documentation

◆ range_t_print()

idaman size_t ida_export range_t_print ( const range_t * cb,
char * buf,
size_t bufsize )

Helper function. Should not be called directly!

◆ DECLARE_TYPE_AS_MOVABLE() [1/3]

DECLARE_TYPE_AS_MOVABLE ( range_t )

◆ RANGESET_HELPER_DEFINITIONS()

RANGESET_HELPER_DEFINITIONS ( idaman )

An ordered set of non-overlapping address ranges.

Constructor

Constructor - Initialize set with 'range'

Constructor - Initialize set with 'ivs'

Set this = 'r' and 'r' = this. See qvector::swap()

Add an address range to the set. If 'range' intersects an existing element e, then e is extended to include 'range', and any superfluous elements (subsets of e) are removed.

Parameters
rangeaddress range to add. cannot be empty
Returns
false if 'range' was not added (the set was unchanged)

Create a new range_t from 'start' and 'end' and add it to the set

Add each element of 'aset' to the set.

Returns
false if no elements were added (the set was unchanged)

Subtract an address range from the set. All subsets of 'range' will be removed, and all elements that intersect 'range' will be truncated/split so they do not include 'range'.

Parameters
rangeaddress range to subtract. cannot be empty.
Returns
false if 'range' was not subtracted (the set was unchanged)

Subtract an ea (an range of size 1) from the set. See sub(const range_t &)

Subtract each range in 'aset' from the set

Returns
false if nothing was subtracted (the set was unchanged)

Is there an ea in 'range' that is also in the rangeset?

Is every ea in 'range' contained in the rangeset?

Print each range_t in the rangeset

Size in bytes

Get the range_t at index 'idx'

Get the last range_t in the set

Get the number of range_t elements in the set

Does the set have zero elements

Delete all elements from the set. See qvector::clear()

Does any element of 'aset' overlap with an element in this rangeset?. See range_t::overlaps()

Does an element of the rangeset contain 'ea'? See range_t::contains(ea_t)

Is every element in 'aset' contained in an element of this rangeset?. See range_t::contains(range_t)

Set the rangeset to its intersection with 'aset'.

Returns
false if the set was unchanged

Is every element in the rangeset contained in an element of 'aset'?

Do this rangeset and 'aset' have identical elements?

< Iterator for rangesets

< Const iterator for rangesets

Get the first range that contains at least one ea_t value greater than 'ea'

Get the first range such that every ea_t value in this range is strictly greater than 'ea'

Get the element from the set that contains 'ea'.

Returns
nullptr if there is no such element

When searching the rangeset, we keep a cached element to help speed up searches.

Returns
a pointer to the cached element

Get the smallest ea_t value greater than 'ea' contained in the rangeset

Get the largest ea_t value less than 'ea' contained in the rangeset

Get the smallest ea_t value greater than 'ea' that is not in the same range as 'ea'

Get the largest ea_t value less than 'ea' that is not in the same range as 'ea'

Subtract the address range (from, from+size) and add the range (to, to+size)

Check if the intended move_chunk() arguments are correct.

Return underlying rangevec_t object

◆ DECLARE_TYPE_AS_MOVABLE() [2/3]

DECLARE_TYPE_AS_MOVABLE ( rangeset_t )

◆ DECLARE_TYPE_AS_MOVABLE() [3/3]

DECLARE_TYPE_AS_MOVABLE ( range64_t )