Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | rz_id_pool_t |
struct | rz_id_storage_t |
struct | rz_ordered_id_storage_t |
Typedefs | |
typedef struct rz_id_pool_t | RzIDPool |
typedef struct rz_id_storage_t | RzIDStorage |
typedef bool(* | RzIDStorageForeachCb) (void *user, void *data, ut32 id) |
typedef bool(* | ROIDStorageCompareCb) (void *in, void *incoming, void *user, int *cmp_res) |
typedef struct rz_ordered_id_storage_t | ROIDStorage |
typedef struct rz_ordered_id_storage_t ROIDStorage |
Definition at line 35 of file rz_idpool.h.
typedef struct rz_id_pool_t RzIDPool |
typedef struct rz_id_storage_t RzIDStorage |
Definition at line 34 of file rz_idpool.h.
Definition at line 72 of file idpool.c.
References free(), rz_id_pool_t::freed_ids, and rz_vector_free().
Referenced by rz_id_storage_delete(), rz_id_storage_free(), rz_id_storage_new(), rz_io_map_fini(), and rz_io_map_init().
Definition at line 34 of file idpool.c.
References rz_id_pool_t::freed_ids, rz_id_pool_t::last_id, rz_id_pool_t::next_id, RZ_FREE_CUSTOM, rz_return_val_if_fail, rz_vector_empty(), rz_vector_free(), rz_vector_pop_front(), and UT32_MAX.
Referenced by io_map_new(), rz_bin_file_new(), rz_id_storage_add(), and rz_io_desc_new().
Definition at line 53 of file idpool.c.
References rz_id_pool_t::freed_ids, rz_id_pool_t::next_id, NULL, rz_vector_new(), rz_vector_push(), rz_vector_reserve(), and rz_id_pool_t::start_id.
Referenced by map_del(), rz_bin_file_free(), and rz_id_storage_delete().
Definition at line 22 of file idpool.c.
References rz_id_pool_t::last_id, rz_id_pool_t::next_id, NULL, RZ_NEW0, and rz_id_pool_t::start_id.
Referenced by rz_id_storage_delete(), rz_id_storage_new(), and rz_io_map_init().
RZ_API bool rz_id_storage_add | ( | RzIDStorage * | storage, |
void * | data, | ||
ut32 * | id | ||
) |
Definition at line 155 of file idpool.c.
References rz_id_storage_t::pool, rz_id_pool_grab_id(), and rz_id_storage_set().
Referenced by parse_namemap(), rz_analysis_esil_load_source(), rz_oids_add(), and rz_oids_insert().
RZ_API void rz_id_storage_delete | ( | RzIDStorage * | storage, |
ut32 | id | ||
) |
Definition at line 221 of file idpool.c.
References rz_id_storage_t::data, id, id_storage_reallocate(), rz_id_pool_t::last_id, NULL, rz_id_storage_t::pool, RZ_FREE, rz_id_pool_free(), rz_id_pool_kick_id(), rz_id_pool_new(), rz_id_storage_t::size, rz_id_pool_t::start_id, and rz_id_storage_t::top_id.
Referenced by rz_analysis_esil_release_source(), rz_bin_file_close(), rz_id_storage_take(), rz_io_desc_free(), rz_oids_add(), rz_oids_delete(), and rz_oids_odelete().
RZ_API bool rz_id_storage_foreach | ( | RzIDStorage * | storage, |
RzIDStorageForeachCb | cb, | ||
void * | user | ||
) |
Definition at line 254 of file idpool.c.
References cb, rz_id_storage_t::data, i, and rz_id_storage_t::top_id.
Referenced by file_is_loaded(), rz_analysis_esil_sources_fini(), rz_core_bin_load(), rz_core_file_close_all_but(), rz_core_file_reopen_in_malloc(), rz_id_storage_list(), rz_io_desc_cache_fini_all(), rz_io_desc_fini(), rz_open_list_ascii_handler(), rz_open_list_handler(), and rz_serialize_io_files_save().
RZ_API void rz_id_storage_free | ( | RzIDStorage * | storage | ) |
Definition at line 270 of file idpool.c.
References rz_id_storage_t::data, free(), rz_id_storage_t::pool, and rz_id_pool_free().
Referenced by parse_custom_name_entry(), rz_analysis_esil_sources_fini(), rz_bin_free(), rz_bin_new(), rz_bin_wasm_destroy(), rz_io_desc_fini(), and rz_oids_free().
RZ_API void* rz_id_storage_get | ( | RzIDStorage * | storage, |
ut32 | id | ||
) |
Definition at line 162 of file idpool.c.
References rz_id_storage_t::data, id, NULL, and rz_id_storage_t::size.
Referenced by _get_source(), rz_bin_wasm_get_function_name(), rz_id_storage_take(), rz_io_desc_del(), rz_io_desc_get(), rz_io_desc_get_next(), rz_io_desc_get_prev(), rz_oids_get(), rz_oids_oget(), rz_oids_sort(), and rz_oids_take().
RZ_API bool rz_id_storage_get_highest | ( | RzIDStorage * | storage, |
ut32 * | id | ||
) |
Definition at line 178 of file idpool.c.
References rz_id_storage_t::data, i, NULL, rz_return_val_if_fail, and rz_id_storage_t::size.
Referenced by rz_io_fd_get_highest().
RZ_API bool rz_id_storage_get_lowest | ( | RzIDStorage * | storage, |
ut32 * | id | ||
) |
Definition at line 169 of file idpool.c.
References rz_id_storage_t::data, i, rz_return_val_if_fail, and rz_id_storage_t::size.
Referenced by rz_io_fd_get_lowest().
RZ_API bool rz_id_storage_get_next | ( | RzIDStorage * | storage, |
ut32 * | id | ||
) |
Definition at line 191 of file idpool.c.
References rz_id_storage_t::data, id, rz_return_val_if_fail, and rz_id_storage_t::size.
Referenced by rz_io_fd_get_next().
RZ_API bool rz_id_storage_get_prev | ( | RzIDStorage * | storage, |
ut32 * | id | ||
) |
Definition at line 206 of file idpool.c.
References rz_id_storage_t::data, id, rz_return_val_if_fail, and rz_id_storage_t::size.
Referenced by rz_io_fd_get_prev().
RZ_API RzList* rz_id_storage_list | ( | RzIDStorage * | s | ) |
Definition at line 283 of file idpool.c.
References _list(), list(), NULL, rz_id_storage_foreach(), rz_list_newf(), and s.
Referenced by __file_history_down(), __file_history_up(), rz_core_vfile_bin_file_deleted(), and rz_open_binary_file_handler().
RZ_API RzIDStorage* rz_id_storage_new | ( | ut32 | start_id, |
ut32 | last_id | ||
) |
Definition at line 80 of file idpool.c.
References NULL, rz_id_storage_t::pool, rz_id_pool_free(), rz_id_pool_new(), and RZ_NEW0.
Referenced by parse_custom_name_entry(), rz_analysis_esil_sources_init(), rz_bin_new(), rz_io_desc_init(), and rz_oids_new().
RZ_API bool rz_id_storage_set | ( | RzIDStorage * | storage, |
void * | data, | ||
ut32 | id | ||
) |
Definition at line 131 of file idpool.c.
References rz_id_storage_t::data, get_msb(), id, id_storage_reallocate(), rz_id_pool_t::last_id, n, rz_id_pool_t::next_id, rz_id_storage_t::pool, rz_id_storage_t::size, and rz_id_storage_t::top_id.
Referenced by rz_bin_open_buf(), rz_id_storage_add(), rz_io_desc_add(), and rz_io_desc_exchange().
RZ_API void* rz_id_storage_take | ( | RzIDStorage * | storage, |
ut32 | id | ||
) |
Definition at line 248 of file idpool.c.
References rz_id_storage_delete(), and rz_id_storage_get().
Referenced by rz_bin_file_close().
RZ_API bool rz_oids_add | ( | ROIDStorage * | storage, |
void * | data, | ||
ut32 * | id, | ||
ut32 * | od | ||
) |
Definition at line 336 of file idpool.c.
References rz_ordered_id_storage_t::data, id, oid_storage_preallocate(), rz_ordered_id_storage_t::permutation, rz_ordered_id_storage_t::psize, rz_ordered_id_storage_t::ptop, rz_id_storage_add(), and rz_id_storage_delete().
Referenced by rz_oids_insert().
RZ_API void rz_oids_delete | ( | ROIDStorage * | storage, |
ut32 | id | ||
) |
Definition at line 406 of file idpool.c.
References rz_ordered_id_storage_t::data, oid_storage_preallocate(), rz_ordered_id_storage_t::permutation, rz_ordered_id_storage_t::psize, rz_ordered_id_storage_t::ptop, RZ_FREE, rz_id_storage_delete(), and rz_oids_to_front().
Referenced by rz_oids_take().
RZ_API ut32 rz_oids_find | ( | ROIDStorage * | storage, |
void * | incoming, | ||
void * | user | ||
) |
Definition at line 614 of file idpool.c.
References oids_od_bfind(), and rz_ordered_id_storage_t::ptop.
RZ_API void* rz_oids_first | ( | ROIDStorage * | storage | ) |
Definition at line 467 of file idpool.c.
References rz_id_storage_t::data, rz_ordered_id_storage_t::data, NULL, rz_ordered_id_storage_t::permutation, and rz_ordered_id_storage_t::ptop.
RZ_API bool rz_oids_foreach | ( | ROIDStorage * | storage, |
RzIDStorageForeachCb | cb, | ||
void * | user | ||
) |
Definition at line 474 of file idpool.c.
References cb, rz_id_storage_t::data, rz_ordered_id_storage_t::data, i, id, rz_ordered_id_storage_t::permutation, and rz_ordered_id_storage_t::ptop.
RZ_API bool rz_oids_foreach_prev | ( | ROIDStorage * | storage, |
RzIDStorageForeachCb | cb, | ||
void * | user | ||
) |
Definition at line 490 of file idpool.c.
References cb, rz_id_storage_t::data, rz_ordered_id_storage_t::data, i, id, rz_ordered_id_storage_t::permutation, and rz_ordered_id_storage_t::ptop.
RZ_API void rz_oids_free | ( | ROIDStorage * | storage | ) |
Definition at line 450 of file idpool.c.
References rz_ordered_id_storage_t::data, free(), rz_ordered_id_storage_t::permutation, and rz_id_storage_free().
RZ_API void* rz_oids_get | ( | ROIDStorage * | storage, |
ut32 | id | ||
) |
Definition at line 301 of file idpool.c.
References rz_ordered_id_storage_t::data, NULL, and rz_id_storage_get().
RZ_API bool rz_oids_get_id | ( | ROIDStorage * | storage, |
ut32 | od, | ||
ut32 * | id | ||
) |
Definition at line 316 of file idpool.c.
References rz_ordered_id_storage_t::permutation, and rz_ordered_id_storage_t::ptop.
Referenced by rz_oids_oget().
RZ_API bool rz_oids_get_od | ( | ROIDStorage * | storage, |
ut32 | id, | ||
ut32 * | od | ||
) |
Definition at line 324 of file idpool.c.
References rz_ordered_id_storage_t::data, rz_ordered_id_storage_t::permutation, and rz_ordered_id_storage_t::ptop.
RZ_API bool rz_oids_insert | ( | ROIDStorage * | storage, |
void * | data, | ||
ut32 * | id, | ||
ut32 * | od, | ||
void * | user | ||
) |
Definition at line 563 of file idpool.c.
References rz_ordered_id_storage_t::cmp, rz_ordered_id_storage_t::data, oid_storage_preallocate(), oids_od_binsert(), rz_ordered_id_storage_t::psize, rz_ordered_id_storage_t::ptop, rz_id_storage_add(), and rz_oids_add().
RZ_API void* rz_oids_last | ( | ROIDStorage * | storage | ) |
Definition at line 459 of file idpool.c.
References rz_id_storage_t::data, rz_ordered_id_storage_t::data, NULL, and rz_ordered_id_storage_t::permutation.
RZ_API ROIDStorage* rz_oids_new | ( | ut32 | start_id, |
ut32 | last_id | ||
) |
Definition at line 289 of file idpool.c.
References rz_ordered_id_storage_t::data, free(), NULL, rz_id_storage_new(), and RZ_NEW0.
RZ_API void rz_oids_odelete | ( | ROIDStorage * | st, |
ut32 | od | ||
) |
Definition at line 420 of file idpool.c.
References rz_ordered_id_storage_t::data, n, oid_storage_preallocate(), rz_ordered_id_storage_t::permutation, rz_ordered_id_storage_t::psize, rz_ordered_id_storage_t::ptop, RZ_FREE, and rz_id_storage_delete().
Referenced by rz_oids_otake().
RZ_API void* rz_oids_oget | ( | ROIDStorage * | storage, |
ut32 | od | ||
) |
Definition at line 308 of file idpool.c.
References rz_ordered_id_storage_t::data, id, NULL, rz_id_storage_get(), and rz_oids_get_id().
Referenced by oids_od_bfind(), and rz_oids_otake().
RZ_API void* rz_oids_otake | ( | ROIDStorage * | st, |
ut32 | od | ||
) |
RZ_API bool rz_oids_sort | ( | ROIDStorage * | storage, |
void * | user | ||
) |
Definition at line 579 of file idpool.c.
References rz_ordered_id_storage_t::cmp, rz_ordered_id_storage_t::data, free(), id, oids_od_binsert(), rz_ordered_id_storage_t::permutation, rz_ordered_id_storage_t::psize, rz_ordered_id_storage_t::ptop, rz_id_storage_get(), and RZ_NEWS0.
RZ_API void* rz_oids_take | ( | ROIDStorage * | storage, |
ut32 | id | ||
) |
Definition at line 437 of file idpool.c.
References rz_ordered_id_storage_t::data, NULL, rz_id_storage_get(), rz_oids_delete(), and rz_return_val_if_fail.
RZ_API bool rz_oids_to_front | ( | ROIDStorage * | storage, |
const ut32 | id | ||
) |
Definition at line 361 of file idpool.c.
References id, rz_ordered_id_storage_t::permutation, and rz_ordered_id_storage_t::ptop.
Referenced by rz_oids_delete().
RZ_API bool rz_oids_to_rear | ( | ROIDStorage * | storage, |
const ut32 | id | ||
) |
Definition at line 382 of file idpool.c.
References rz_ordered_id_storage_t::data, found, id, rz_id_pool_t::next_id, rz_ordered_id_storage_t::permutation, rz_id_storage_t::pool, and rz_ordered_id_storage_t::ptop.