Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | rz_interval_node_t |
struct | rz_interval_tree_t |
Macros | |
#define | rz_interval_tree_foreach(tree, it, dat) for ((it) = rz_rbtree_first(&(tree)->root->node); rz_rbtree_iter_has(&it) && (dat = rz_interval_tree_iter_get(&it)->data); rz_rbtree_iter_next(&(it))) |
#define | rz_interval_tree_foreach_prev(tree, it, dat) for ((it) = rz_rbtree_last(&(tree)->root->node); rz_rbtree_iter_has(&it) && (dat = rz_rbtree_iter_get(&it, RzIntervalNode, node)->data); rz_rbtree_iter_prev(&(it))) |
Typedefs | |
typedef struct rz_interval_node_t | RzIntervalNode |
typedef void(* | RzIntervalNodeFree) (void *data) |
typedef struct rz_interval_tree_t | RzIntervalTree |
typedef bool(* | RzIntervalIterCb) (RzIntervalNode *node, void *user) |
typedef RBIter | RzIntervalTreeIter |
#define rz_interval_tree_foreach | ( | tree, | |
it, | |||
dat | |||
) | for ((it) = rz_rbtree_first(&(tree)->root->node); rz_rbtree_iter_has(&it) && (dat = rz_interval_tree_iter_get(&it)->data); rz_rbtree_iter_next(&(it))) |
Definition at line 95 of file rz_intervaltree.h.
#define rz_interval_tree_foreach_prev | ( | tree, | |
it, | |||
dat | |||
) | for ((it) = rz_rbtree_last(&(tree)->root->node); rz_rbtree_iter_has(&it) && (dat = rz_rbtree_iter_get(&it, RzIntervalNode, node)->data); rz_rbtree_iter_prev(&(it))) |
Definition at line 98 of file rz_intervaltree.h.
typedef bool(* RzIntervalIterCb) (RzIntervalNode *node, void *user) |
Definition at line 72 of file rz_intervaltree.h.
typedef struct rz_interval_node_t RzIntervalNode |
typedef void(* RzIntervalNodeFree) (void *data) |
Definition at line 31 of file rz_intervaltree.h.
typedef struct rz_interval_tree_t RzIntervalTree |
typedef RBIter RzIntervalTreeIter |
Definition at line 85 of file rz_intervaltree.h.
RZ_API bool rz_interval_tree_all_at | ( | RzIntervalTree * | tree, |
ut64 | start, | ||
RzIntervalIterCb | cb, | ||
void * | user | ||
) |
Definition at line 221 of file intervaltree.c.
References cb, rz_interval_tree_first_at(), rz_rbtree_iter_get, rz_rbtree_iter_has, rz_rbtree_iter_next(), rz_interval_node_t::start, and start.
Referenced by collect_nodes_at(), and find_node_at().
RZ_API bool rz_interval_tree_all_in | ( | RzIntervalTree * | tree, |
ut64 | value, | ||
bool | end_inclusive, | ||
RzIntervalIterCb | cb, | ||
void * | user | ||
) |
Definition at line 262 of file intervaltree.c.
References cb, rz_interval_tree_t::root, rz_interval_node_all_in(), and value.
Referenced by collect_nodes_in(), find_node_in(), and rz_reg_filter_items_covered().
RZ_API bool rz_interval_tree_all_intersect | ( | RzIntervalTree * | tree, |
ut64 | start, | ||
ut64 | end, | ||
bool | end_inclusive, | ||
RzIntervalIterCb | cb, | ||
void * | user | ||
) |
Definition at line 291 of file intervaltree.c.
References cb, test_evm::end, rz_interval_tree_t::root, rz_interval_node_all_intersect(), and start.
Referenced by collect_nodes_intersect().
|
inlinestatic |
Definition at line 67 of file rz_intervaltree.h.
References rz_interval_node_t::data, NULL, rz_interval_tree_node_at(), and start.
RZ_API bool rz_interval_tree_delete | ( | RzIntervalTree * | tree, |
RzIntervalNode * | node, | ||
bool | free | ||
) |
Definition at line 139 of file intervaltree.c.
References cmp_exact_node(), rz_interval_tree_t::free, free(), interval_node_free(), rz_interval_node_t::node, node_max(), NULL, r, rz_interval_tree_t::root, root, rz_rbtree_aug_delete(), and unwrap.
Referenced by del(), and rz_interval_tree_resize().
|
inlinestatic |
Definition at line 91 of file rz_intervaltree.h.
References NULL, and rz_interval_tree_t::root.
Referenced by rz_serialize_analysis_meta_save().
RZ_API void rz_interval_tree_fini | ( | RzIntervalTree * | tree | ) |
Definition at line 114 of file intervaltree.c.
References rz_interval_tree_t::free, interval_node_free(), rz_interval_node_t::node, rz_interval_tree_t::root, and rz_rbtree_free().
Referenced by rz_analysis_free(), rz_analysis_purge(), rz_meta_rebase(), and rz_reg_filter_items_covered().
RZ_API RBIter rz_interval_tree_first_at | ( | RzIntervalTree * | tree, |
ut64 | start | ||
) |
Definition at line 183 of file intervaltree.c.
References rz_rb_node_t::child, rz_rb_iter_t::len, rz_interval_node_t::node, rz_rb_iter_t::path, rz_interval_tree_node_at(), start, and unwrap.
Referenced by rz_interval_tree_all_at(), and rz_interval_tree_node_at_data().
RZ_API void rz_interval_tree_init | ( | RzIntervalTree * | tree, |
RzIntervalNodeFree | free | ||
) |
Definition at line 101 of file intervaltree.c.
References rz_interval_tree_t::free, free(), NULL, and rz_interval_tree_t::root.
Referenced by rz_analysis_new(), rz_analysis_purge(), rz_meta_rebase(), and rz_reg_filter_items_covered().
RZ_API bool rz_interval_tree_insert | ( | RzIntervalTree * | tree, |
ut64 | start, | ||
ut64 | end, | ||
void * | data | ||
) |
Definition at line 121 of file intervaltree.c.
References cmp(), rz_interval_node_t::data, rz_interval_node_t::end, test_evm::end, free(), rz_interval_node_t::node, node_max(), NULL, r, rz_interval_tree_t::root, root, RZ_NEW0, rz_rbtree_aug_insert(), rz_return_val_if_fail, rz_interval_node_t::start, start, and unwrap.
Referenced by meta_load_cb(), meta_set(), rz_interval_tree_resize(), rz_meta_rebase(), and rz_reg_filter_items_covered().
|
inlinestatic |
Definition at line 87 of file rz_intervaltree.h.
References rz_rbtree_iter_get.
Referenced by DEFINE_HANDLE_TS_FCN_AND_SYMBOL(), del(), print_meta_list(), rz_core_cmd_foreach3(), rz_core_visual_comments(), rz_core_visual_hudstuff(), rz_meta_get_size(), rz_meta_rebase(), and rz_serialize_analysis_meta_save().
RZ_API RzIntervalNode* rz_interval_tree_node_at | ( | RzIntervalTree * | tree, |
ut64 | start | ||
) |
Definition at line 169 of file intervaltree.c.
References rz_rb_node_t::child, rz_interval_node_t::node, NULL, rz_interval_tree_t::root, rz_interval_node_t::start, start, and unwrap.
Referenced by rz_interval_tree_at(), and rz_interval_tree_first_at().
RZ_API RzIntervalNode* rz_interval_tree_node_at_data | ( | RzIntervalTree * | tree, |
ut64 | start, | ||
void * | data | ||
) |
Definition at line 206 of file intervaltree.c.
References rz_interval_node_t::data, NULL, rz_interval_tree_first_at(), rz_rbtree_iter_get, rz_rbtree_iter_has, rz_rbtree_iter_next(), rz_interval_node_t::start, and start.
RZ_API bool rz_interval_tree_resize | ( | RzIntervalTree * | tree, |
RzIntervalNode * | node, | ||
ut64 | new_start, | ||
ut64 | new_end | ||
) |
Definition at line 147 of file intervaltree.c.
References cmp_exact_node(), rz_interval_node_t::data, rz_interval_node_t::end, rz_interval_node_t::node, node_max(), rz_interval_tree_t::root, rz_interval_tree_delete(), rz_interval_tree_insert(), rz_rbtree_aug_update_sum(), rz_return_val_if_fail, and rz_interval_node_t::start.
Referenced by meta_set().