Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Macros | |
#define | END_OF_MAP_IDS UT32_MAX |
Definition at line 140 of file io_map.c.
References addr, delta, desc, fd, io_map_new(), NULL, rz_io_desc_get(), and RZ_PERM_X.
Referenced by rz_io_map_add(), and rz_io_map_add_batch().
void io_map_calculate_skyline | ( | RzIO * | io | ) |
Definition at line 14 of file io_map.c.
References map(), rz_io_t::map_skyline, rz_io_t::maps, rz_pvector_foreach, rz_skyline_add(), and rz_skyline_clear().
Referenced by rz_io_map_cleanup(), rz_io_map_del(), rz_io_map_del_for_fd(), rz_io_map_depriorize(), rz_io_map_priorize_for_fd(), rz_io_map_remap(), rz_io_map_reset(), rz_io_map_resize(), and rz_io_update().
XXX: this is leaking a map!!!
Definition at line 24 of file io_map.c.
References addr, delta, fd, free(), map(), rz_io_t::map_ids, rz_io_t::map_skyline, rz_io_t::maps, NULL, rz_id_pool_grab_id(), RZ_NEW0, rz_pvector_push(), rz_skyline_add(), st64, and UT64_MAX.
Referenced by io_map_add(), rz_io_map_new(), and rz_io_open_at().
Free the map, also sending the appropriate event.
Definition at line 93 of file io_map.c.
References rz_io_t::event, map(), map_free(), rz_io_t::map_ids, RZ_EVENT_IO_MAP_DEL, rz_event_send(), rz_id_pool_kick_id(), and rz_return_if_fail.
Referenced by rz_io_map_cleanup(), rz_io_map_del(), and rz_io_map_del_for_fd().
|
static |
Definition at line 151 of file io_map.c.
References addr, delta, fd, and io_map_add().
Referenced by ds_init(), rz_core_analysis_esil_init_mem(), rz_core_serve(), rz_io_bind(), rz_open_maps_all_fd_handler(), rz_open_maps_map_fd_handler(), and rz_open_maps_map_handler().
RZ_API RzIOMap* rz_io_map_add_batch | ( | RzIO * | io, |
int | fd, | ||
int | perm, | ||
ut64 | delta, | ||
ut64 | addr, | ||
ut64 | size | ||
) |
Definition at line 155 of file io_map.c.
References addr, delta, fd, and io_map_add().
Referenced by add_map(), and io_create_mem_map().
Definition at line 287 of file io_map.c.
References del(), rz_io_t::files, i, io_map_calculate_skyline(), map(), map_del(), rz_io_t::maps, rz_io_desc_get(), rz_io_map_fini(), rz_io_map_init(), rz_pvector_at(), rz_pvector_len(), rz_pvector_remove_at(), rz_return_if_fail, and rz_warn_if_reached.
Referenced by rz_io_desc_close(), rz_io_desc_del(), and rz_io_map_priorize_for_fd().
Definition at line 192 of file io_map.c.
References i, io_map_calculate_skyline(), map(), map_del(), rz_io_t::maps, rz_pvector_at(), rz_pvector_len(), rz_pvector_remove_at(), and rz_return_val_if_fail.
Referenced by rz_core_file_close(), rz_debug_dmp_init(), and rz_open_maps_remove_handler().
Definition at line 208 of file io_map.c.
References fd, i, io_map_calculate_skyline(), map(), map_del(), rz_io_t::maps, rz_pvector_at(), rz_pvector_len(), rz_pvector_remove_at(), and rz_return_val_if_fail.
Definition at line 340 of file io_map.c.
References map(), and RZ_FREE.
Referenced by rz_open_maps_name_del_handler(), and rz_open_maps_name_id_del_handler().
Definition at line 248 of file io_map.c.
References i, io_map_calculate_skyline(), map(), rz_io_t::maps, rz_pvector_at(), rz_pvector_len(), rz_pvector_push_front(), rz_pvector_remove_at(), and rz_return_val_if_fail.
Referenced by rz_open_maps_deprioritize_handler().
Definition at line 111 of file io_map.c.
References regress::m, map(), rz_io_t::maps, rz_pvector_foreach, and rz_return_val_if_fail.
Definition at line 124 of file io_map.c.
References NULL, and rz_io_map_resolve().
Referenced by rz_open_maps_deprioritize_handler(), and rz_open_maps_prioritize_handler().
Definition at line 318 of file io_map.c.
References rz_io_t::event, map(), rz_io_t::map_ids, rz_io_t::map_skyline, rz_io_t::maps, NULL, RZ_EVENT_IO_MAP_DEL, rz_event_send(), rz_id_pool_free(), rz_pvector_clear(), rz_pvector_foreach, rz_return_if_fail, and rz_skyline_clear().
Referenced by rz_io_fini(), rz_io_map_cleanup(), and rz_io_map_reset().
Definition at line 176 of file io_map.c.
References addr, rz_io_t::map_skyline, NULL, rz_return_val_if_fail, and rz_skyline_get().
Referenced by __core_analysis_fcn(), __core_visual_gogo(), canWrite(), cmd_print_blocks(), flagbar_foreach(), get_esil_stack_name(), isValidAddress(), meta_for_reloc(), num_callback(), open_maps_list(), print_cmd_analysis_after_traps_print(), rz_analysis_try_get_fcn(), rz_cmd_debug_continue_mapped_io_handler(), rz_core_analysis_get_stats(), rz_core_extend_at(), rz_core_get_boundaries_prot(), rz_core_visual_title(), rz_debug_dmp_init(), rz_io_addr_is_mapped(), rz_io_bind(), rz_io_is_valid_offset(), rz_io_map_is_mapped(), rz_io_v2p(), rz_open_maps_flags_handler(), rz_open_maps_list_cur_handler(), rz_open_maps_name_del_handler(), rz_open_maps_name_handler(), rz_open_maps_relocate_current_handler(), rz_open_show_current_handler(), rz_seek_begin_handler(), and rz_seek_end_handler().
Definition at line 388 of file io_map.c.
References fd, map(), rz_io_t::maps, NULL, rz_list_append(), rz_list_newf(), and rz_pvector_foreach.
Referenced by DEFINE_HANDLE_TS_FCN_AND_SYMBOL(), rz_core_cmd_foreach3(), rz_core_raw_file_print(), rz_io_bind(), rz_io_map_remap_fd(), and rz_io_resize().
Definition at line 163 of file io_map.c.
References delta, map(), rz_io_t::maps, NULL, rz_pvector_foreach_prev, and rz_return_val_if_fail.
Referenced by rz_core_pava(), rz_io_bind(), and rz_io_p2v().
Definition at line 101 of file io_map.c.
References END_OF_MAP_IDS, map_free(), rz_io_t::map_ids, rz_io_t::maps, rz_id_pool_free(), rz_id_pool_new(), rz_pvector_init(), and rz_return_if_fail.
Referenced by rz_io_init(), rz_io_map_cleanup(), and rz_io_map_reset().
Definition at line 181 of file io_map.c.
References addr, rz_io_map_get(), and rz_return_val_if_fail.
Referenced by bp_is_mapped().
Returns a memory location that can hold enough bytes without overlapping.
io | RzIO instance |
size | Size of the section |
Definition at line 425 of file io_map.c.
References rz_io_t::bits, rz_io_map_next_available(), and ut64().
Referenced by rz_core_bin_load().
Definition at line 50 of file io_map.c.
References addr, delta, fd, and io_map_new().
Referenced by handle_tmp_desc(), perform_mapped_file_yank(), rz_core_bin_load(), rz_core_cmd_subst_i(), rz_debug_dmp_init(), rz_io_map_remap(), rz_io_map_resize(), rz_io_open(), rz_io_open_at(), and rz_main_rizin().
Definition at line 371 of file io_map.c.
References addr, from, map(), rz_io_t::maps, rz_itv_begin(), rz_itv_end(), rz_pvector_foreach, to, ut64(), and UT64_MAX.
Referenced by rz_core_search_value_in_range().
Definition at line 347 of file io_map.c.
References addr, map(), rz_io_t::maps, rz_itv_contain(), rz_itv_end(), rz_itv_size(), RZ_MAX, rz_pvector_foreach, to, and ut64().
Referenced by get_esil_stack_name(), perform_mapped_file_yank(), and rz_io_map_location().
Definition at line 232 of file io_map.c.
References i, map(), rz_io_t::map_skyline, rz_io_t::maps, rz_pvector_at(), rz_pvector_len(), rz_pvector_push(), rz_pvector_remove_at(), rz_return_val_if_fail, and rz_skyline_add().
Referenced by rz_open_maps_prioritize_binid_handler(), and rz_open_maps_prioritize_handler().
Definition at line 264 of file io_map.c.
References rz_vector_t::a, fd, i, io_map_calculate_skyline(), map(), rz_io_t::maps, NULL, rz_io_map_cleanup(), rz_pvector_at(), rz_pvector_clear(), rz_pvector_init(), rz_pvector_insert_range(), rz_pvector_len(), rz_pvector_push(), rz_pvector_remove_at(), rz_return_val_if_fail, and rz_pvector_t::v.
Referenced by rz_open_maps_prioritize_fd_handler().
Definition at line 54 of file io_map.c.
References addr, io_map_calculate_skyline(), map(), rz_io_map_new(), rz_io_map_resolve(), ut64(), and UT64_MAX.
Referenced by rz_debug_dmp_init(), rz_io_map_remap_fd(), rz_open_maps_relocate_current_handler(), and rz_open_maps_relocate_handler().
Definition at line 69 of file io_map.c.
References addr, fd, map(), maps(), rz_io_map_get_for_fd(), rz_io_map_remap(), rz_list_free(), and rz_list_get_n().
Referenced by rz_io_bind().
Definition at line 186 of file io_map.c.
References io_map_calculate_skyline(), rz_io_map_fini(), and rz_io_map_init().
Referenced by rz_io_close_all(), and rz_open_maps_remove_all_handler().
Definition at line 403 of file io_map.c.
References addr, io_map_calculate_skyline(), map(), rz_io_map_new(), rz_io_map_resolve(), ut64(), and UT64_MAX.
Referenced by rz_io_resize(), and rz_open_maps_resize_handler().
Definition at line 128 of file io_map.c.
References map(), rz_io_t::maps, NULL, rz_pvector_foreach, and rz_return_val_if_fail.
Referenced by rz_io_map_exists_for_id(), rz_io_map_remap(), rz_io_map_resize(), rz_open_maps_flags_handler(), rz_open_maps_name_id_del_handler(), and rz_open_maps_name_id_handler().
Definition at line 332 of file io_map.c.
References free(), map(), and strdup().
Referenced by ds_init(), rz_core_analysis_esil_init_mem(), rz_open_maps_all_fd_handler(), rz_open_maps_map_fd_handler(), rz_open_maps_map_handler(), rz_open_maps_name_handler(), and rz_open_maps_name_id_handler().
Returns the pointer to vector containing maps list.
io | RzIO instance |
Definition at line 435 of file io_map.c.
References rz_io_t::maps, NULL, and rz_return_val_if_fail.
Referenced by __core_visual_gogo(), get_brks(), open_maps_list(), rz_core_analysis_address(), rz_core_analysis_code_count(), rz_core_analysis_coverage_count(), rz_core_get_boundaries_prot(), rz_core_io_file_reopen(), rz_core_visual_cmd(), rz_heap_resolve_main_arena(), rz_main_rizin(), rz_open_maps_flags_global_handler(), and rz_open_maps_list_ascii_handler().
Definition at line 159 of file io_map.c.
References io_map_calculate_skyline().