Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_util.h>
Go to the source code of this file.
Classes | |
struct | sparse_init_config_t |
struct | buf_sparse_priv |
Typedefs | |
typedef struct sparse_init_config_t | SparseInitConfig |
typedef struct buf_sparse_priv | SparsePriv |
Variables | |
static const RzBufferMethods | buffer_sparse_methods |
typedef struct sparse_init_config_t SparseInitConfig |
typedef struct buf_sparse_priv SparsePriv |
Definition at line 144 of file buf_sparse.c.
References b, buf_sparse_priv::base, buf_sparse_priv::chunks, get_priv_sparse(), rz_buf_free(), RZ_FREE, and rz_vector_fini().
Definition at line 123 of file buf_sparse.c.
References b, sparse_init_config_t::base, buf_sparse_priv::base, chunk_fini(), buf_sparse_priv::chunks, NULL, buf_sparse_priv::offset, rz_buf_ref(), RZ_BUF_SPARSE_WRITE_MODE_SPARSE, RZ_NEW0, rz_vector_init(), sparse_init_config_t::write_mode, and buf_sparse_priv::write_mode.
Definition at line 202 of file buf_sparse.c.
References b, buf_sparse_priv::base, c, chunk_index_in(), buf_sparse_priv::chunks, get_priv_sparse(), i, len, max, memcpy(), memset(), buf_sparse_priv::offset, r, rz_buf_read_at(), RZ_MIN, rz_vector_index_ptr(), rz_vector_len(), to, ut64(), and UT64_MAX.
Definition at line 152 of file buf_sparse.c.
References assert(), b, c, chunk_cmp(), chunk_fini(), buf_sparse_priv::chunks, get_priv_sparse(), i, n, NULL, realloc(), rz_vector_index_ptr(), rz_vector_len(), rz_vector_lower_bound, rz_vector_remove_range(), sparse_write(), autogen_x86imm::tmp, and to.
Definition at line 275 of file buf_sparse.c.
References addr, b, get_priv_sparse(), max, buf_sparse_priv::offset, RZ_BUF_CUR, RZ_BUF_END, RZ_BUF_SET, rz_warn_if_reached, sparse_limits(), st64, and ut64().
Definition at line 189 of file buf_sparse.c.
References b, buf_sparse_priv::base, get_priv_sparse(), max, r, rz_buf_size(), sparse_limits(), and ut64().
Definition at line 255 of file buf_sparse.c.
References b, buf_sparse_priv::base, get_priv_sparse(), len, buf_sparse_priv::offset, r, RZ_BUF_SPARSE_WRITE_MODE_SPARSE, RZ_BUF_SPARSE_WRITE_MODE_THROUGH, rz_buf_write_at(), sparse_write(), st64, and buf_sparse_priv::write_mode.
Definition at line 33 of file buf_sparse.c.
References a, addr, c, and RZ_NUM_CMP.
Referenced by buf_sparse_resize(), and chunk_index_in().
|
static |
Definition at line 19 of file buf_sparse.c.
Referenced by buf_sparse_init(), buf_sparse_resize(), and sparse_write().
|
static |
Definition at line 41 of file buf_sparse.c.
References addr, chunk_cmp(), buf_sparse_priv::chunks, i, and rz_vector_upper_bound.
Referenced by buf_sparse_read(), rz_buf_sparse_populated_in(), and sparse_write().
|
inlinestatic |
Definition at line 117 of file buf_sparse.c.
References b, and rz_warn_if_fail.
Referenced by buf_sparse_fini(), buf_sparse_read(), buf_sparse_resize(), buf_sparse_seek(), buf_sparse_size(), buf_sparse_write(), rz_buf_sparse_get_chunks(), rz_buf_sparse_populated_in(), and rz_buf_sparse_set_write_mode().
RZ_API const RzBufferSparseChunk* rz_buf_sparse_get_chunks | ( | RzBuffer * | b, |
RZ_NONNULL size_t * | count | ||
) |
Only for sparse RzBuffers, get all sparse data chunks currently populated.
Definition at line 313 of file buf_sparse.c.
References b, buffer_sparse_methods, buf_sparse_priv::chunks, count, get_priv_sparse(), NULL, rz_return_val_if_fail, rz_vector_index_ptr(), and rz_vector_len().
Referenced by __write(), and ihex_write().
from | inclusive |
to | inclusive |
Definition at line 339 of file buf_sparse.c.
References b, buffer_sparse_methods, c, chunk_index_in(), buf_sparse_priv::chunks, from, get_priv_sparse(), rz_return_val_if_fail, rz_vector_index_ptr(), and to.
Referenced by rz_bin_relocs_patch_maps().
RZ_API void rz_buf_sparse_set_write_mode | ( | RzBuffer * | b, |
RzBufferSparseWriteMode | mode | ||
) |
Only for sparse RzBuffers.
Definition at line 325 of file buf_sparse.c.
References b, buffer_sparse_methods, get_priv_sparse(), rz_return_if_fail, and buf_sparse_priv::write_mode.
Referenced by bflt_patch_relocs(), patch_relocs(), and rz_coff_get_patched_buf().
|
static |
Definition at line 24 of file buf_sparse.c.
References c, buf_sparse_priv::chunks, max, rz_vector_empty(), rz_vector_index_ptr(), and rz_vector_len().
Referenced by buf_sparse_seek(), and buf_sparse_size().
Definition at line 50 of file buf_sparse.c.
References addr, c, chunk_fini(), chunk_index_in(), buf_sparse_priv::chunks, rz_buf_sparse_chunk_t::data, rz_buf_sparse_chunk_t::from, i, len, memcpy(), NULL, realloc(), rz_vector_index_ptr(), rz_vector_insert(), rz_vector_remove_range(), rz_buf_sparse_chunk_t::to, ut64(), and UT64_MAX.
Referenced by buf_sparse_resize(), and buf_sparse_write().
|
static |
Definition at line 302 of file buf_sparse.c.
Referenced by new_buffer(), rz_buf_sparse_get_chunks(), rz_buf_sparse_populated_in(), and rz_buf_sparse_set_write_mode().