Rizin
unix-like reverse engineering framework and cli tools
|
#include "rz_list.h"
#include <rz_util.h>
#include <rz_bind.h>
#include "rz_vector.h"
#include "rz_skyline.h"
Go to the source code of this file.
Classes | |
struct | rz_io_t |
struct | rz_io_desc_t |
struct | RzIODescData |
struct | rz_io_plugin_t |
struct | rz_io_map_t |
struct | rz_io_cache_t |
struct | rz_io_desc_cache_t |
struct | rz_event_io_write_t |
struct | rz_event_io_desc_close_t |
struct | rz_event_io_map_del_t |
struct | rz_io_bind_t |
Macros | |
#define | RZ_IO_SEEK_SET 0 |
#define | RZ_IO_SEEK_CUR 1 |
#define | RZ_IO_SEEK_END 2 |
#define | rz_io_map_get_from(map) map->itv.addr |
#define | rz_io_map_get_to(map) (rz_itv_size(map->itv) ? rz_itv_end(map->itv) - 1 : 0) |
#define | RZ_IO_DESC_CACHE_SIZE (sizeof(ut64) * 8) |
#define | rz_io_bind_init(x) memset(&x, 0, sizeof(x)) |
#define | rz_io_range_new() RZ_NEW0(RzIORange) |
#define | rz_io_range_free(x) free(x) |
#define rz_io_map_get_to | ( | map | ) | (rz_itv_size(map->itv) ? rz_itv_end(map->itv) - 1 : 0) |
typedef struct rz_event_io_desc_close_t RzEventIODescClose |
typedef struct rz_event_io_map_del_t RzEventIOMapDel |
typedef struct rz_event_io_write_t RzEventIOWrite |
typedef struct rz_io_bind_t RzIOBind |
typedef struct rz_io_cache_t RzIOCache |
typedef struct rz_io_desc_t RzIODesc |
typedef struct rz_io_desc_cache_t RzIODescCache |
typedef struct rz_io_map_t RzIOMap |
typedef struct rz_io_plugin_t RzIOPlugin |
Definition at line 11 of file ioutils.c.
References rz_io_map_get(), rz_return_val_if_fail, and rz_io_t::va.
Referenced by rz_io_bind().
Definition at line 550 of file io.c.
References rz_io_bind_t::addr_is_mapped, rz_io_bind_t::close, rz_io_bind_t::desc_get, rz_io_bind_t::desc_size, rz_io_bind_t::desc_use, rz_io_bind_t::fd_close, rz_io_bind_t::fd_get_current, rz_io_bind_t::fd_get_map, rz_io_bind_t::fd_get_name, rz_io_bind_t::fd_getbuf, rz_io_bind_t::fd_is_dbg, rz_io_bind_t::fd_open, rz_io_bind_t::fd_read, rz_io_bind_t::fd_read_at, rz_io_bind_t::fd_remap, rz_io_bind_t::fd_resize, rz_io_bind_t::fd_seek, rz_io_bind_t::fd_size, rz_io_bind_t::fd_write, rz_io_bind_t::fd_write_at, rz_io_bind_t::init, rz_io_bind_t::io, rz_io_bind_t::is_valid_offset, rz_io_bind_t::map_add, rz_io_bind_t::map_get, rz_io_bind_t::map_get_paddr, rz_io_bind_t::open, rz_io_bind_t::open_at, rz_io_bind_t::p2v, rz_io_bind_t::read_at, rz_io_addr_is_mapped(), rz_io_desc_get(), rz_io_desc_size(), rz_io_fd_close(), rz_io_fd_get_buf(), rz_io_fd_get_current(), rz_io_fd_get_name(), rz_io_fd_is_dbg(), rz_io_fd_open(), rz_io_fd_read(), rz_io_fd_read_at(), rz_io_fd_resize(), rz_io_fd_seek(), rz_io_fd_size(), rz_io_fd_write(), rz_io_fd_write_at(), rz_io_is_valid_offset(), rz_io_map_add(), rz_io_map_get(), rz_io_map_get_for_fd(), rz_io_map_get_paddr(), rz_io_map_remap_fd(), rz_io_open_at(), rz_io_open_nomap(), rz_io_p2v(), rz_io_read_at(), rz_io_system(), rz_io_use_fd(), rz_io_v2p(), rz_io_write_at(), rz_return_if_fail, rz_io_bind_t::system, rz_io_bind_t::v2p, and rz_io_bind_t::write_at.
Referenced by __open(), download_pdb(), rz_core_file_reopen(), rz_core_init(), rz_diff_file_open(), and rzfind_open_file().
Definition at line 16 of file io_cache.c.
References addr, rz_io_t::cache_skyline, rz_return_val_if_fail, and rz_skyline_contains().
Referenced by rz_io_desc_read().
Definition at line 35 of file io_cache.c.
References c, rz_io_t::cache, rz_io_t::cached, eprintf, from, PFMT64x, capstone::range, rz_io_write_at(), rz_itv_begin(), rz_itv_overlap(), rz_itv_size(), rz_pvector_foreach, rz_return_if_fail, and to.
Referenced by rz_write_cache_commit_all_handler(), and rz_write_cache_commit_handler().
Definition at line 28 of file io_cache.c.
References rz_io_t::cache, rz_io_t::cache_skyline, rz_io_t::cached, rz_pvector_fini(), rz_return_if_fail, and rz_skyline_fini().
Referenced by rz_core_disasm_pde(), rz_io_close_all(), and rz_io_fini().
Definition at line 21 of file io_cache.c.
References rz_io_t::cache, cache_item_free(), rz_io_t::cache_skyline, rz_io_t::cached, rz_pvector_init(), rz_return_if_fail, and rz_skyline_init().
Referenced by rz_core_disasm_pde(), and rz_io_init().
Definition at line 64 of file io_cache.c.
References c, rz_io_t::cache, rz_io_t::cache_skyline, rz_io_t::cached, free(), from, capstone::range, rz_io_write_at(), rz_itv_begin(), rz_itv_overlap(), rz_itv_size(), rz_pvector_foreach, rz_pvector_foreach_prev, rz_pvector_remove_data(), rz_return_val_if_fail, rz_skyline_add(), rz_skyline_clear(), and to.
Referenced by rz_write_cache_remove_handler().
Definition at line 131 of file io_cache.c.
References rz_vector_t::a, addr, rz_io_t::cache_skyline, rz_io_cache_t::data, rz_io_cache_t::itv, len, rz_vector_t::len, memcpy(), read(), rz_io_cache_read(), rz_itv_begin(), rz_itv_size(), RZ_MIN, rz_return_val_if_fail, rz_skyline_get_item_intersect(), st64, ut64(), UT64_ADD_OVFCHK, UT64_MAX, rz_skyline_t::v, and while().
Referenced by rz_io_cache_read(), rz_io_desc_read(), rz_io_nread_at(), rz_io_read_at(), and rz_io_read_at_mapped().
Definition at line 57 of file io_cache.c.
References rz_io_t::cache, rz_io_t::cache_skyline, rz_io_t::cached, rz_pvector_clear(), rz_return_if_fail, and rz_skyline_clear().
Referenced by rz_core_link_stroff(), and rz_write_cache_remove_all_handler().
Definition at line 93 of file io_cache.c.
References addr, rz_io_t::cache, rz_io_t::cache_skyline, rz_io_t::cachemode, calloc(), rz_io_cache_t::data, rz_io_t::event, free(), rz_io_cache_t::itv, len, memcpy(), rz_io_cache_t::odata, RZ_EVENT_IO_WRITE, rz_event_send(), rz_io_cache_write(), rz_io_read_at(), RZ_NEW0, rz_pvector_push(), rz_return_val_if_fail, rz_skyline_add(), ut64(), UT64_ADD_OVFCHK, UT64_MAX, and rz_io_cache_t::written.
Referenced by rz_io_cache_write(), rz_io_desc_read(), and rz_io_write_at().
Definition at line 258 of file io.c.
References rz_io_cache_fini(), rz_io_desc_fini(), rz_io_desc_init(), and rz_io_map_reset().
Referenced by __close_file_cb(), file_load(), rz_core_io_file_open(), and rz_open_close_all_handler().
Definition at line 49 of file io_desc.c.
References desc, eprintf, rz_io_t::files, rz_id_storage_set(), rz_return_val_if_fail, and rz_sys_backtrace().
Referenced by find_apk_binary(), rz_core_file_open_many(), rz_io_desc_open(), rz_io_desc_open_plugin(), and rz_io_open_many().
Definition at line 343 of file p_cache.c.
References __desc_cache_cleanup_cb(), and desc.
Referenced by rz_io_desc_exchange(), and rz_io_desc_resize().
Definition at line 302 of file p_cache.c.
References __desc_cache_commit_cb(), desc, NULL, and RZ_PERM_W.
Referenced by rz_write_pcache_commit_handler().
Definition at line 358 of file p_cache.c.
References __desc_fini_cb(), desc, and NULL.
Referenced by rz_io_desc_free().
Definition at line 362 of file p_cache.c.
References __desc_fini_cb(), rz_io_t::files, NULL, and rz_id_storage_foreach().
Referenced by cb_iopcache(), cb_iopcacheread(), cb_iopcachewrite(), and rz_io_fini().
Definition at line 79 of file p_cache.c.
References desc, NULL, pcache_kv_free(), and true.
Referenced by rz_io_desc_cache_write().
Definition at line 249 of file p_cache.c.
References __desc_cache_list_cb(), __riocache_free(), c, calloc(), desc, NULL, rz_io_pread_at(), rz_itv_begin(), rz_itv_size(), rz_list_free(), rz_list_newf(), and ut64().
Referenced by rz_core_io_pcache_print().
Definition at line 142 of file p_cache.c.
References rz_io_desc_cache_t::cached, rz_io_desc_cache_t::cdata, desc, int, len, NULL, RZ_IO_DESC_CACHE_SIZE, rz_io_desc_size(), and ut64().
Referenced by rz_io_desc_read().
Definition at line 86 of file p_cache.c.
References rz_io_desc_cache_t::cached, rz_io_desc_cache_t::cdata, desc, int, len, NULL, RZ_EVENT_IO_WRITE, rz_event_send(), rz_io_desc_cache_init(), RZ_IO_DESC_CACHE_SIZE, rz_io_desc_size(), RZ_NEW0, and ut64().
Referenced by rz_io_desc_write().
Definition at line 165 of file io_desc.c.
References desc, rz_io_t::event, RZ_EVENT_IO_DESC_CLOSE, rz_event_send(), rz_io_desc_del(), and rz_io_map_cleanup().
Referenced by dmp_close(), handle_tmp_desc(), hash_context_create_desc_io_stdin(), hash_context_create_desc_io_string(), hash_context_run(), io_create_mem_map(), perform_mapped_file_yank(), reopen_in_malloc_cb(), rz_core_cmd_subst_i(), rz_core_file_close(), rz_core_rtr_rap_run(), rz_core_vfile_bin_file_deleted(), rz_diff_io_close(), rz_diff_io_open(), rz_io_close(), rz_io_fd_close(), rz_io_reopen(), and rz_open_binary_file_handler().
Definition at line 61 of file io_desc.c.
References desc, rz_io_t::desc, fd, rz_io_t::files, NULL, rz_id_storage_get(), rz_io_desc_free(), rz_io_map_cleanup(), and rz_return_val_if_fail.
Referenced by rz_io_desc_close(), and rz_io_reopen().
Definition at line 275 of file io_desc.c.
References rz_io_desc_t::cache, desc, fd, rz_io_desc_t::fd, rz_io_t::files, map(), rz_io_t::maps, rz_io_t::p_cache, rz_io_desc_t::perm, rz_id_storage_set(), rz_io_desc_cache_cleanup(), rz_io_desc_get(), RZ_PERM_X, and rz_pvector_foreach.
Referenced by reopen_in_malloc_cb(), rz_io_reopen(), and rz_open_exchange_handler().
Definition at line 390 of file io_desc.c.
References rz_io_t::desc, desc_fini_cb(), rz_io_t::files, NULL, rz_id_storage_foreach(), rz_id_storage_free(), and rz_return_val_if_fail.
Referenced by rz_io_close_all(), rz_io_desc_init(), and rz_io_fini().
Definition at line 35 of file io_desc.c.
References desc, free(), rz_id_storage_delete(), and rz_io_desc_cache_fini().
Referenced by desc_fini_cb(), rz_core_file_open(), rz_core_file_open_many(), rz_io_desc_del(), rz_io_desc_open(), rz_io_desc_open_plugin(), and rz_io_zip_open().
Definition at line 73 of file io_desc.c.
References fd, rz_io_t::files, NULL, rz_id_storage_get(), and rz_return_val_if_fail.
Referenced by add_map(), basefind_new_bin_file(), core_file_do_load_for_debug(), file_save(), io_map_add(), is_valid_dmp_file(), is_valid_gdb_file(), isValidAddress(), map_multi_dex(), reopen_nobin_headers(), rz_core_bin_apply_maps(), rz_core_bin_load(), rz_core_bin_set_arch_bits(), rz_core_bin_whole_strings(), rz_core_file_binlist(), rz_core_file_close(), rz_core_file_find_by_name(), rz_core_file_info_print(), rz_core_file_open(), rz_core_file_open_load(), rz_core_file_print(), rz_core_file_reopen(), rz_core_file_reopen_debug(), rz_core_file_reopen_remote_debug(), rz_core_raw_file_print(), rz_core_rtr_gdb_cb(), rz_core_setup_debugger(), rz_core_sysenv_begin(), rz_core_visual_title(), rz_io_bind(), rz_io_desc_exchange(), rz_io_desc_get_highest(), rz_io_desc_get_lowest(), rz_io_fd_close(), rz_io_fd_get_base(), rz_io_fd_get_buf(), rz_io_fd_get_name(), rz_io_fd_get_pid(), rz_io_fd_get_tid(), rz_io_fd_is_blockdevice(), rz_io_fd_is_chardevice(), rz_io_fd_is_dbg(), rz_io_fd_read(), rz_io_fd_read_at(), rz_io_fd_resize(), rz_io_fd_seek(), rz_io_fd_size(), rz_io_fd_write(), rz_io_fd_write_at(), rz_io_map_cleanup(), rz_io_reopen(), rz_io_use_fd(), rz_main_rizin(), rz_open_binary_add_handler(), rz_open_malloc_handler(), rz_open_maps_all_fd_handler(), rz_open_maps_map_fd_handler(), rz_open_maps_map_handler(), rz_open_show_current_handler(), rz_write_pcache_commit_handler(), and rz_write_pcache_list_handler().
Definition at line 344 of file io_desc.c.
References desc.
Referenced by core_file_do_load_for_debug(), rz_debug_get_baddr(), and rz_io_fd_get_base().
Returns the underlying buffer of the io descriptor.
[in] | desc | The io descriptor |
[out] | size | Size of buffer returned |
Definition at line 241 of file io_desc.c.
References desc, NULL, and rz_return_val_if_fail.
Referenced by rz_io_fd_get_buf().
Definition at line 310 of file io_desc.c.
References desc.
Referenced by rz_core_setup_debugger(), rz_debug_get_baddr(), and rz_io_fd_get_pid().
Definition at line 327 of file io_desc.c.
References desc.
Referenced by rz_debug_get_baddr(), and rz_io_fd_get_tid().
Definition at line 368 of file io_desc.c.
References rz_io_t::files, rz_id_storage_new(), rz_io_desc_fini(), and rz_return_val_if_fail.
Referenced by rz_io_close_all(), and rz_io_init().
Definition at line 261 of file io_desc.c.
References desc.
Referenced by reopen_in_malloc_cb(), and rz_io_fd_is_blockdevice().
Definition at line 268 of file io_desc.c.
References desc.
Referenced by rz_io_fd_is_chardevice(), rz_io_plugin_read_at(), and rz_io_plugin_write_at().
Definition at line 303 of file io_desc.c.
References desc.
Referenced by reopen_in_malloc_cb(), rz_core_bin_apply_maps(), rz_core_bin_load(), and rz_io_fd_is_dbg().
RZ_API RzIODesc* rz_io_desc_new | ( | RzIO * | io, |
RzIOPlugin * | plugin, | ||
const char * | uri, | ||
int | flags, | ||
int | mode, | ||
void * | data | ||
) |
Definition at line 11 of file io_desc.c.
References desc, rz_io_t::files, NULL, rz_id_storage_t::pool, rz_id_pool_grab_id(), RZ_NEW0, and strdup().
Referenced by __open(), __rap_open(), dmp_open(), find_apk_binary(), rz_io_ar_open(), rz_io_ar_open_many(), rz_io_def_mmap_open(), rz_io_zip_open(), rz_io_zip_open_many(), rzk__open(), vf_open(), and windbg_open().
Definition at line 112 of file io_desc.c.
References desc, NULL, rz_io_plugin_t::open, rz_io_desc_add(), rz_io_desc_free(), rz_io_plugin_resolve(), rz_return_val_if_fail, and strdup().
Referenced by rz_io_fd_open(), and rz_io_open_nomap().
RZ_API RzIODesc* rz_io_desc_open_plugin | ( | RzIO * | io, |
RzIOPlugin * | plugin, | ||
const char * | uri, | ||
int | flags, | ||
int | mode | ||
) |
Definition at line 139 of file io_desc.c.
References rz_io_plugin_t::check, desc, rz_io_t::files, NULL, rz_io_plugin_t::open, rz_io_desc_add(), rz_io_desc_free(), rz_return_val_if_fail, and strdup().
Definition at line 197 of file io_desc.c.
References desc, len, rz_io_cache_at(), rz_io_cache_read(), rz_io_cache_write(), rz_io_desc_cache_read(), rz_io_desc_seek(), rz_io_plugin_read(), RZ_IO_SEEK_CUR, RZ_PERM_R, seek(), ut64(), and UT64_MAX.
Referenced by rz_io_desc_read_at(), and rz_io_fd_read().
Definition at line 351 of file io_desc.c.
References addr, desc, len, rz_io_desc_read(), rz_io_desc_seek(), and RZ_IO_SEEK_SET.
Referenced by dmp_read(), read_at_kernel_virtual(), reopen_in_malloc_cb(), rz_io_fd_read_at(), and rz_io_pread_at().
Definition at line 250 of file io_desc.c.
References desc, and rz_io_desc_cache_cleanup().
Referenced by rz_io_fd_resize(), and rz_io_resize().
Definition at line 217 of file io_desc.c.
Referenced by dmp_lseek(), rz_io_desc_read(), rz_io_desc_read_at(), rz_io_desc_size(), rz_io_desc_write(), rz_io_desc_write_at(), rz_io_fd_seek(), rz_io_plugin_read_at(), rz_io_plugin_write(), rz_io_plugin_write_at(), rz_io_seek(), and rz_io_shift().
Definition at line 224 of file io_desc.c.
References desc, off, rz_io_desc_seek(), RZ_IO_SEEK_CUR, RZ_IO_SEEK_END, RZ_IO_SEEK_SET, and ut64().
Referenced by __desc_cache_cleanup_cb(), basefind_new_bin_file(), calculate_decrypt(), calculate_encrypt(), calculate_hash(), desc_list_cb(), desc_list_json_cb(), desc_list_table_cb(), desc_list_visual_cb(), init_desc_list_visual_cb(), map_multi_dex(), reopen_in_malloc_cb(), rz_core_bin_load(), rz_core_bin_whole_strings(), rz_core_cmd_subst_i(), rz_core_file_info_print(), rz_core_file_open_many(), rz_core_file_print(), rz_core_sysenv_begin(), rz_diff_file_open(), rz_diff_io_open(), rz_io_bind(), rz_io_desc_cache_read(), rz_io_desc_cache_write(), rz_io_extend_at(), rz_io_fd_size(), rz_io_is_valid_offset(), rz_io_open(), rz_io_open_at(), rz_io_size(), rz_main_rizin(), and rz_open_maps_map_fd_handler().
Definition at line 183 of file io_desc.c.
References desc, len, rz_io_desc_cache_write(), rz_io_desc_seek(), rz_io_plugin_write(), RZ_IO_SEEK_CUR, and rz_return_val_if_fail.
Referenced by rz_io_desc_write_at(), rz_io_fd_write(), and rz_io_open_buffer().
Definition at line 358 of file io_desc.c.
References addr, desc, len, rz_io_desc_seek(), rz_io_desc_write(), and RZ_IO_SEEK_SET.
Referenced by dmp_write(), reopen_in_malloc_cb(), rz_io_fd_write_at(), rz_io_pwrite_at(), and rz_open_malloc_handler().
Extend the RzIODesc at addr
by inserting size
0 bytes.
io | Reference to RzIO instance |
addr | Address where to insert new 0 bytes |
size | Number of 0 bytes to insert |
Definition at line 453 of file io.c.
References addr, rz_io_t::desc, free(), IO_EXTEND_BLOCK_SZ, rz_io_desc_t::perm, rz_io_desc_t::plugin, rz_io_desc_size(), rz_io_pread_at(), rz_io_pwrite_at(), rz_io_resize(), RZ_MAX, RZ_NEWS, RZ_NEWS0, RZ_PERM_RW, rz_return_val_if_fail, autogen_x86imm::tmp, ut64(), and UT64_ADD_OVFCHK.
Referenced by rz_core_extend_at().
Definition at line 11 of file io_fd.c.
References fd, rz_io_desc_close(), and rz_io_desc_get().
Referenced by ds_free(), ds_init(), get_bin_info(), GetHeapGlobalsOffset(), rz_core_analysis_esil_init_mem(), rz_core_analysis_esil_init_mem_del(), rz_core_file_close_fd(), and rz_io_bind().
Definition at line 106 of file io_fd.c.
References desc, fd, rz_io_t::files, rz_io_desc_get(), rz_io_desc_get_base(), and rz_return_val_if_fail.
Returns the underlying buffer of the file descriptor.
[in] | io | The RzIO instance |
[in] | fd | The file descriptor |
[out] | size | Size of the buffer returned |
Definition at line 53 of file io_fd.c.
References fd, NULL, rz_io_desc_get(), rz_io_desc_get_buf(), and rz_return_val_if_fail.
Referenced by rz_io_bind().
Definition at line 135 of file io_fd.c.
References rz_io_t::desc, rz_io_desc_t::fd, and rz_return_val_if_fail.
Referenced by append_bound(), DEFINE_HANDLE_TS_FCN_AND_SYMBOL(), handle_tmp_desc(), prioritize_file(), rz_core_bin_set_arch_bits(), rz_core_cmd_foreach3(), rz_core_file_info_print(), rz_core_serve(), rz_io_bind(), rz_main_rizin(), rz_main_rz_bin(), rz_open_binary_add_handler(), rz_open_binary_file_handler(), rz_open_maps_all_fd_handler(), rz_open_maps_map_fd_handler(), rz_open_prioritize_next_handler(), rz_open_prioritize_next_rotate_handler(), and rz_open_prioritize_prev_handler().
Definition at line 161 of file io_fd.c.
References fd, rz_io_t::files, rz_id_storage_get_highest(), and rz_return_val_if_fail.
Referenced by rz_io_desc_get_highest().
Definition at line 170 of file io_fd.c.
References fd, rz_io_t::files, rz_id_storage_get_lowest(), and rz_return_val_if_fail.
Referenced by rz_io_desc_get_lowest(), and rz_open_prioritize_next_rotate_handler().
Definition at line 112 of file io_fd.c.
References desc, fd, rz_io_t::files, NULL, rz_io_desc_get(), and rz_return_val_if_fail.
Referenced by rz_io_bind().
Definition at line 143 of file io_fd.c.
References fd, rz_io_t::files, rz_id_storage_get_next(), and rz_return_val_if_fail.
Referenced by rz_io_desc_get_next(), rz_open_prioritize_next_handler(), and rz_open_prioritize_next_rotate_handler().
Definition at line 92 of file io_fd.c.
References desc, fd, rz_io_t::files, rz_io_desc_get(), and rz_io_desc_get_pid().
Referenced by cb_cfgdebug(), cmd_debug_pid(), core_file_do_load_for_debug(), rz_core_debug_attach(), and rz_core_file_reopen().
Definition at line 152 of file io_fd.c.
References fd, rz_io_t::files, rz_id_storage_get_prev(), and rz_return_val_if_fail.
Referenced by rz_io_desc_get_prev(), and rz_open_prioritize_prev_handler().
Definition at line 100 of file io_fd.c.
References desc, fd, rz_io_t::files, rz_io_desc_get(), rz_io_desc_get_tid(), and rz_return_val_if_fail.
Referenced by cb_cfgdebug(), cmd_debug_pid(), core_file_do_load_for_debug(), and rz_core_file_reopen().
Definition at line 62 of file io_fd.c.
References fd, rz_io_desc_get(), and rz_io_desc_is_blockdevice().
Definition at line 66 of file io_fd.c.
References fd, rz_io_desc_get(), and rz_io_desc_is_chardevice().
Definition at line 86 of file io_fd.c.
References desc, fd, rz_io_t::files, rz_io_desc_get(), rz_io_desc_is_dbg(), and rz_return_val_if_fail.
Referenced by rz_io_bind().
Definition at line 6 of file io_fd.c.
References desc, flags, and rz_io_desc_open().
Referenced by ds_init(), get_bin_info(), GetHeapGlobalsOffset(), rz_core_analysis_esil_init_mem(), and rz_io_bind().
Definition at line 16 of file io_fd.c.
References desc, fd, len, rz_io_desc_get(), rz_io_desc_read(), and rz_return_val_if_fail.
Referenced by rz_io_bind().
Definition at line 71 of file io_fd.c.
References addr, desc, fd, len, rz_io_desc_get(), and rz_io_desc_read_at().
Referenced by fd_read_at_wrap(), and rz_io_bind().
Definition at line 58 of file io_fd.c.
References fd, rz_io_desc_get(), and rz_io_desc_resize().
Referenced by rz_io_bind().
Definition at line 35 of file io_fd.c.
References addr, fd, rz_io_desc_get(), rz_io_desc_seek(), and ut64().
Referenced by rz_io_bind().
Definition at line 42 of file io_fd.c.
References fd, rz_io_desc_get(), and rz_io_desc_size().
Referenced by cmd_print_bars(), file_resize(), get_bin_info(), GetHeapGlobalsOffset(), isValidAddress(), num_callback(), resize_helper(), rz_core_get_boundaries_prot(), rz_core_serve(), rz_io_bind(), rz_io_resize(), rz_main_rizin(), rz_open_maps_map_handler(), rz_resize_handler(), rz_resize_human_handler(), rz_seek_end_handler(), and system_exec().
Definition at line 26 of file io_fd.c.
References desc, fd, len, rz_io_desc_get(), rz_io_desc_write(), and rz_return_val_if_fail.
Referenced by rz_io_bind().
Definition at line 80 of file io_fd.c.
References addr, desc, fd, len, rz_io_desc_get(), rz_io_desc_write_at(), and rz_return_val_if_fail.
Referenced by fd_write_at_wrap(), and rz_io_bind().
Definition at line 724 of file io.c.
References rz_io_t::envprofile, rz_io_t::event, free(), rz_io_t::plugins, ptrace_wrap_instance_stop(), rz_io_t::runprofile, rz_event_free(), RZ_FREE, rz_io_cache_fini(), rz_io_desc_cache_fini_all(), rz_io_desc_fini(), rz_io_map_fini(), rz_list_free(), and w32dbg_wrap_free().
Referenced by rz_io_free().
Definition at line 126 of file io.c.
References free(), and rz_io_fini().
Referenced by download_pdb(), hash_context_run(), rz_core_fini(), rz_diff_io_close(), rz_diff_io_open(), and rzfind_open_file().
Definition at line 114 of file io.c.
References rz_io_t::addrbytes, rz_io_t::event, rz_io_t::map_skyline, NULL, rz_event_new(), rz_io_cache_init(), rz_io_desc_init(), rz_io_map_init(), rz_io_plugin_init(), rz_return_val_if_fail, and rz_skyline_init().
Referenced by rz_io_new().
Definition at line 404 of file io.c.
References rz_io_t::desc, rz_io_plugin_t::listener, and rz_io_desc_t::plugin.
Referenced by rz_core_file_open(), and rz_core_rtr_rap_run().
Definition at line 20 of file ioutils.c.
References rz_io_t::desc, map(), rz_io_desc_t::perm, rz_io_desc_size(), rz_io_map_get(), RZ_PERM_R, rz_return_val_if_fail, and rz_io_t::va.
Referenced by __core_analysis_fcn(), __op_refs(), _analysis_calls(), _pointer_table(), agraph_refresh(), do_string_search(), ds_print_core_vmode(), esilbreak_reg_write(), is_valid_xref(), mymemread(), mymemwrite(), myregwrite(), myvalid(), rz_analyze_all_data_references_to_code_handler(), rz_core_analysis_esil(), rz_core_analysis_fcn(), rz_core_analysis_function_add(), rz_core_analysis_search_xrefs(), rz_core_asm_strsearch(), rz_core_esil_step(), rz_core_is_valid_offset(), rz_core_search_prelude(), rz_core_search_value_in_range(), and rz_io_bind().
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 | flags, | ||
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 110 of file io.c.
References rz_io_init(), and RZ_NEW0.
Referenced by download_pdb(), hash_context_run(), rz_core_init(), rz_diff_io_open(), and rzfind_open_file().
Definition at line 338 of file io.c.
References addr, rz_io_t::cached, fd_read_at_wrap(), rz_io_t::ff, len, memset(), on_map_skyline(), rz_io_t::Oxff, rz_io_cache_read(), rz_io_pread_at(), RZ_PERM_R, rz_return_val_if_fail, and rz_io_t::va.
Referenced by core_recover_golang_functions_go_1_16(), core_recover_golang_functions_go_1_18(), core_recover_golang_functions_go_1_2(), decode_from_table(), decode_ldr_set_addr(), GH(), go_offset(), op_at_phys(), read_at_kernel_virtual(), recover_string_at(), rizin_compare_words(), rz_cmd_cmp_hex_block_handler(), rz_cmd_cmp_hex_block_hexdiff_handler(), rz_cmd_cmp_hex_diff_lines_handler(), rz_cmd_heap_chunks_print_handler(), rz_core_analysis_recover_golang_functions(), rz_core_analysis_resolve_golang_strings(), rz_core_cmp_disasm(), rz_core_cmp_mem_data(), rz_core_cmp_mem_mem(), rz_core_cmpwatch_add(), rz_core_cmpwatch_update(), rz_core_transform_op(), rz_core_write_duplicate_at(), rz_heap_tcache_content(), and type_match().
Definition at line 156 of file io.c.
References desc, NULL, rz_io_desc_size(), rz_io_map_new(), rz_io_open_nomap(), and rz_return_val_if_fail.
Referenced by rz_open_binary_file_handler().
RZ_API RzIODesc* rz_io_open_at | ( | RzIO * | io, |
const char * | uri, | ||
int | perm, | ||
int | mode, | ||
ut64 | at, | ||
RZ_NULLABLE RZ_OUT RzIOMap ** | map | ||
) |
Open a file and directly map it at the given offset.
This executes both rz_io_open_nomap() and rz_io_map_new() and returns their results without updating the skyline.
uri | file uri to open |
at | where to map the file |
map | optionally returns the created RzIOMap |
Definition at line 177 of file io.c.
References desc, io_map_new(), regress::m, map(), NULL, rz_io_desc_size(), rz_io_map_new(), rz_io_open_nomap(), rz_return_val_if_fail, ut64(), and UT64_MAX.
Referenced by io_create_mem_map(), open_nobin_file(), and rz_io_bind().
Definition at line 133 of file io.c.
References b, desc, free(), PFMT64d, rz_buf_data(), rz_buf_size(), rz_io_desc_write(), rz_io_open_nomap(), rz_str_newf(), autogen_x86imm::tmp, and ut64().
Referenced by handle_tmp_desc(), and rz_core_cmd_subst_i().
Definition at line 201 of file io.c.
References rz_io_plugin_t::close, desc, rz_io_t::desc, rz_io_t::files, NULL, rz_io_plugin_t::open_many, rz_io_desc_add(), rz_io_plugin_resolve(), rz_return_val_if_fail, and strdup().
Referenced by rz_core_file_open_many().
Definition at line 145 of file io.c.
References rz_io_t::autofd, desc, rz_io_t::desc, NULL, rz_io_desc_open(), and rz_return_val_if_fail.
Referenced by add_map(), hash_context_create_desc_io_stdin(), hash_context_create_desc_io_string(), hash_context_run(), perform_mapped_file_yank(), reopen_in_malloc_cb(), rz_core_file_open(), rz_core_rtr_rap_run(), rz_diff_io_open(), rz_io_bind(), rz_io_open(), rz_io_open_at(), rz_io_open_buffer(), rz_io_reopen(), and rzfind_open_file().
Definition at line 533 of file io.c.
References map(), rz_io_map_get_paddr(), and UT64_MAX.
Referenced by annotated_hexdump(), rz_cmd_help(), rz_io_bind(), and rz_print_hexdump_bits_handler().
RZ_API bool rz_io_plugin_add | ( | RzIO * | io, |
RZ_BORROW RzIOPlugin * | plugin | ||
) |
Definition at line 12 of file io_plugin.c.
References memcpy(), rz_io_plugin_t::name, rz_io_t::plugins, rz_list_append(), and RZ_NEW0.
Referenced by rz_core_init(), and rz_io_plugin_init().
RZ_API RzIOPlugin* rz_io_plugin_get_default | ( | RzIO * | io, |
const char * | filename, | ||
bool | many | ||
) |
Definition at line 47 of file io_plugin.c.
References rz_io_plugin_t::check, default_plugin, and NULL.
Referenced by rz_io_plugin_byname(), and rz_io_plugin_resolve().
Definition at line 32 of file io_plugin.c.
References free(), i, io_static_plugins, rz_io_t::plugins, RZ_ARRAY_SIZE, rz_io_plugin_add(), and rz_list_newf().
Referenced by rz_io_init().
Definition at line 79 of file io_plugin.c.
References desc, len, and RZ_PERM_R.
Referenced by rz_io_desc_read(), and rz_io_plugin_read_at().
Definition at line 103 of file io_plugin.c.
References addr, desc, len, rz_io_desc_is_chardevice(), rz_io_desc_seek(), rz_io_plugin_read(), and RZ_IO_SEEK_SET.
RZ_API RzIOPlugin* rz_io_plugin_resolve | ( | RzIO * | io, |
const char * | filename, | ||
bool | many | ||
) |
Definition at line 54 of file io_plugin.c.
References rz_io_plugin_t::check, rz_io_t::plugins, and rz_io_plugin_get_default().
Referenced by dmp_open(), rz_io_desc_open(), and rz_io_open_many().
Definition at line 89 of file io_plugin.c.
References desc, len, RZ_EVENT_IO_WRITE, rz_event_send(), rz_io_desc_seek(), RZ_IO_SEEK_CUR, RZ_PERM_W, and ut64().
Referenced by rz_io_desc_write(), and rz_io_plugin_write_at().
Definition at line 110 of file io_plugin.c.
References addr, desc, len, rz_io_desc_is_chardevice(), rz_io_desc_seek(), rz_io_plugin_write(), and RZ_IO_SEEK_SET.
Definition at line 269 of file io.c.
References rz_io_t::desc, rz_io_t::ff, len, memset(), rz_io_t::Oxff, rz_io_desc_read_at(), and rz_return_val_if_fail.
Referenced by basefind_create_pointer_map(), calculate_decrypt(), calculate_encrypt(), calculate_hash(), find_next_diff(), find_prev_diff(), rz_core_bin_create_digests(), rz_diff_draw_tui(), rz_diff_slurp_file(), rz_io_desc_cache_list(), rz_io_extend_at(), rz_io_nread_at(), rz_io_read_at(), rz_io_read_at_mapped(), and rzfind_open_file().
Definition at line 277 of file io.c.
References rz_io_t::desc, len, rz_io_desc_write_at(), and rz_return_val_if_fail.
Referenced by __desc_cache_commit_cb(), hash_context_create_desc_io_stdin(), hash_context_create_desc_io_string(), rz_io_extend_at(), and rz_io_write_at().
Definition at line 300 of file io.c.
References addr, rz_io_t::cached, len, rz_io_cache_read(), rz_io_pread_at(), rz_io_vread_at_mapped(), RZ_PERM_R, rz_return_val_if_fail, and rz_io_t::va.
Referenced by __analysis_esil_function(), __core_cmd_search_asm_byteswap(), __core_cmd_search_asm_infinite(), _analysis_calls(), _cb_hit(), cmd_aea(), cmd_debug_backtrace(), cmd_p_minus_e(), cmd_print_bars(), cmd_print_pxA(), cmd_write_bits(), core_analysis_graph_construct_nodes(), core_walk_function_blocks(), disassembly_as_table(), do_analysis_search(), do_debug_trace_calls(), do_ref_search(), do_section_search(), do_string_search(), do_syscall_search(), ds_print_ptr(), ds_show_refs(), dump_maps(), esilbreak_mem_read(), func_walk_blocks(), get_ptr(), get_ptr_ble(), getpcfromstack(), graph_construct_nodes(), ioMemcpy(), is_string_at(), jemalloc_get_bins(), jemalloc_get_chunks(), jemalloc_print_narenas(), meta_string_8bit_add(), myregwrite(), num_callback(), objc_build_refs(), perform_mapped_file_yank(), prevop_addr(), print_cmd_analysis_after_traps_print(), print_double_linked_list_bin_graph(), print_double_linked_list_bin_simple(), print_format_values(), print_heap_chunk(), print_malloc_info(), print_rop(), propagate_types_among_used_variables(), readDword(), readQword(), rz_analysis_try_get_fcn(), rz_analysis_xrefs_from_list_handler(), rz_cmd_analysis(), rz_cmd_debug_step_prog_handler(), rz_cmd_disassemble_ropchain_handler(), rz_cmd_disassembly_basic_block_as_text_json_handler(), rz_cmd_disassembly_basic_block_handler(), rz_cmd_disassembly_function_handler(), rz_cmd_print(), rz_core_analysis_bytes(), rz_core_analysis_data(), rz_core_analysis_esil(), rz_core_analysis_esil_emulate(), rz_core_analysis_hasrefs_to_depth(), rz_core_analysis_hint_set_offset(), rz_core_analysis_name(), rz_core_analysis_op(), rz_core_analysis_read_at(), rz_core_analysis_rename(), rz_core_analysis_search(), rz_core_analysis_search_xrefs(), rz_core_arg_get(), rz_core_asm_back_disassemble(), rz_core_asm_back_disassemble_all(), rz_core_asm_bwdisassemble(), rz_core_asm_strsearch(), rz_core_bin_export_info(), rz_core_bin_whole_strings(), rz_core_block_read(), rz_core_debug_step_skip(), rz_core_disasm_instruction(), rz_core_dump(), rz_core_esil_step(), rz_core_link_stroff(), rz_core_op_analysis(), rz_core_op_str(), rz_core_print_disasm(), rz_core_print_disasm_all(), rz_core_print_dump_str(), rz_core_print_function_disasm_json(), rz_core_print_hexdump_byline_str(), rz_core_print_hexdump_diff_str(), rz_core_print_hexdump_or_hexdiff_str(), rz_core_rtr_gdb_cb(), rz_core_search_cb(), rz_core_search_prelude(), rz_core_search_rop(), rz_core_shift_block(), rz_core_syscall_as_string(), rz_core_visual_asm(), rz_core_yank(), rz_core_yank_string(), rz_heap_bin_content(), rz_heap_chunks_list(), rz_heap_fastbin_content(), rz_heap_update_main_arena(), rz_io_bind(), rz_io_cache_write(), rz_io_read(), rz_io_read_i(), rz_io_shift(), rz_open_malloc_handler(), rz_print_byte_bitstream_handler(), rz_print_hexdump_hexless_words_handler(), rz_write_from_io_xchg_handler(), search_hash(), search_similar_pattern_in(), step_until_inst(), step_until_optype(), stringAt(), tcache_chunk_size(), and tcache_read().
Definition at line 318 of file io.c.
References addr, rz_io_t::cached, fd_read_at_wrap(), rz_io_t::ff, len, memset(), on_map_skyline(), rz_io_t::Oxff, rz_io_cache_read(), rz_io_pread_at(), RZ_PERM_R, rz_return_val_if_fail, and rz_io_t::va.
Referenced by read_ahead(), rz_core_esil_step(), rz_core_search_value_in_range(), and rz_core_write_value_inc_at().
Definition at line 41 of file ioutils.c.
References addr, RZ_DIM, rz_io_read_at(), rz_read_ble(), rz_return_val_if_fail, and val.
Referenced by core_analysis_followptr(), ds_build_op_str(), and rz_core_analysis_bytes().
Definition at line 231 of file io.c.
References rz_io_plugin_t::close, fd, rz_io_desc_t::fd, rz_io_desc_t::plugin, rz_io_desc_t::referer, rz_io_desc_close(), rz_io_desc_del(), rz_io_desc_exchange(), rz_io_desc_get(), rz_io_open_nomap(), and rz_io_desc_t::uri.
Referenced by rz_core_file_reopen_debug(), rz_core_io_file_open(), and rz_core_io_file_reopen().
Definition at line 418 of file io.c.
References rz_io_t::desc, rz_io_desc_t::fd, rz_io_map_t::id, rz_io_map_t::itv, maps(), rz_io_desc_resize(), rz_io_fd_size(), rz_io_map_get_for_fd(), rz_io_map_resize(), rz_list_free(), rz_interval_t::size, and ut64().
Referenced by file_resize(), and rz_io_extend_at().
Definition at line 632 of file io.c.
References rz_io_t::desc, rz_io_t::off, rz_io_desc_seek(), RZ_IO_SEEK_CUR, RZ_IO_SEEK_END, and RZ_IO_SEEK_SET.
Referenced by perform_mapped_file_yank(), rz_core_seek(), and rzfind_open_file().
Set a mask that is used on all following write operations.
io | Reference to RzIo instance |
mask | Mask to apply |
len | Number of bytes in the mask |
Definition at line 517 of file io.c.
References free(), len, malloc(), mask, memcpy(), NULL, rz_return_val_if_fail, rz_io_t::write_mask, and rz_io_t::write_mask_len.
Referenced by rz_write_mask_reset_handler(), and rz_write_mask_set_handler().
Definition at line 596 of file io.c.
References calloc(), chunksize, rz_io_t::desc, test_evm::end, free(), rz_io_t::off, rz_io_desc_seek(), rz_io_read_at(), RZ_IO_SEEK_SET, rz_io_write_at(), rz_num_abs(), src, start, and ut64().
Referenced by file_resize().
Definition at line 399 of file io.c.
References rz_io_t::desc, and rz_io_desc_size().
Referenced by basefind_create_pointer_map(), core_search_for_xrefs_in_boundaries(), flagbar_foreach(), perform_mapped_file_yank(), rz_basefind(), rz_core_get_boundaries_prot(), rz_core_shift_block(), rz_core_visual_title(), and rzfind_open_file().
Definition at line 411 of file io.c.
References cmd, rz_io_t::desc, NULL, rz_io_desc_t::plugin, RZ_STR_ISNOTEMPTY, and rz_io_plugin_t::system.
Referenced by __rap_continue(), __rap_reg_profile(), __rap_reg_read(), __rap_step(), cb_dbg_gdb_page_size(), cb_dbg_gdb_retries(), handle_ts_stmt(), rz_cmd_remote(), rz_core_cmd_subst_i(), rz_core_debug_attach(), rz_debug_select(), rz_io_bind(), and rz_io_system_run_oldhandler().
Definition at line 159 of file io_map.c.
References io_map_calculate_skyline().
Definition at line 118 of file io_fd.c.
References desc, rz_io_t::desc, fd, rz_io_desc_t::fd, NULL, rz_io_desc_get(), and rz_return_val_if_fail.
Referenced by core_file_do_load_for_io_plugin(), DEFINE_HANDLE_TS_FCN_AND_SYMBOL(), handle_tmp_desc(), map_multi_dex(), perform_mapped_file_yank(), prioritize_file(), rz_core_analysis_search(), rz_core_bin_load(), rz_core_bin_raise(), rz_core_binfiles_delete(), rz_core_cmd_subst_i(), rz_core_file_bin_raise(), rz_core_file_open(), rz_core_file_reopen(), rz_core_file_set_by_fd(), rz_core_shift_block(), rz_io_bind(), rz_open_binary_file_handler(), rz_open_use_handler(), and rz_write_from_file_handler().
Definition at line 541 of file io.c.
References delta, map(), rz_io_map_get(), st64, and UT64_MAX.
Referenced by add_new_bin_string(), add_new_func_symbol(), meta_string_guess_add(), rz_cmd_help(), rz_core_meta_pascal_string_add(), and rz_io_bind().
Definition at line 283 of file io.c.
References fd_read_at_wrap(), rz_io_t::ff, len, memset(), on_map_skyline(), rz_io_t::Oxff, RZ_PERM_R, and rz_return_val_if_fail.
Referenced by rz_io_read_at().
Definition at line 358 of file io.c.
References addr, rz_io_t::cached, free(), i, len, rz_io_cache_write(), rz_io_pwrite_at(), rz_io_vwrite_at(), rz_mem_dup(), RZ_PERM_W, rz_return_val_if_fail, rz_io_t::va, rz_io_t::write_mask, and rz_io_t::write_mask_len.
Referenced by ioMemcpy(), op_at_phys(), rz_cmd_debug_dml_handler(), rz_core_shift_block(), rz_core_visual_asm(), rz_core_visual_cmd(), rz_core_write_at(), rz_heap_write_heap_chunk(), rz_io_bind(), rz_io_cache_commit(), rz_io_cache_invalidate(), rz_io_shift(), rz_io_write(), rz_io_write_i(), rz_main_rizin(), rz_write_from_file_handler(), rz_write_from_io_xchg_handler(), rz_write_from_socket_handler(), and rzfind_open_file().
Definition at line 53 of file ioutils.c.
References addr, RZ_DIM, rz_io_write_at(), rz_return_val_if_fail, rz_write_ble(), and val.
RZ_LIB_VERSION_HEADER | ( | rz_io | ) |
|
extern |
Definition at line 135 of file io_ar.c.
Referenced by rz_io_ar_open(), and rz_io_ar_open_many().
|
extern |
Definition at line 197 of file io_bfdbg.c.
Referenced by __open().
|
extern |
Definition at line 106 of file io_bochs.c.
Referenced by __open().
|
extern |
Definition at line 571 of file io_debug.c.
|
extern |
Definition at line 200 of file io_default.c.
Referenced by rz_io_def_mmap_open().
|
extern |
Definition at line 162 of file io_dmp.c.
Referenced by dmp_open().
|
extern |
|
extern |
|
extern |
Definition at line 1228 of file io_gprobe.c.
Referenced by __open().
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
Definition at line 50 of file io_malloc.c.
Referenced by __open().
|
extern |
|
extern |
Definition at line 138 of file io_procpid.c.
|
extern |
Definition at line 1 of file io_ptrace.c.
|
extern |
|
extern |
Definition at line 279 of file io_rap.c.
Referenced by __rap_open().
|
extern |
Definition at line 137 of file io_rzk.c.
Referenced by rzk__open().
|
extern |
Definition at line 177 of file io_rzpipe.c.
Referenced by __open().
|
extern |
Definition at line 156 of file io_rzweb.c.
Referenced by __open().
|
extern |
|
extern |
|
extern |
Definition at line 110 of file io_sparse.c.
Referenced by __open().
|
extern |
|
extern |
|
extern |
|
extern |
Definition at line 215 of file io_w32dbg.c.
|
extern |
Definition at line 684 of file io_windbg.c.
Referenced by windbg_open().
|
extern |
Definition at line 366 of file io_winedbg.c.
Referenced by __open().
|
extern |
Definition at line 148 of file io_winkd.c.
Referenced by __open().
|
extern |
Definition at line 675 of file io_zip.c.
Referenced by find_apk_binary(), rz_io_zip_open(), and rz_io_zip_open_many().