14 if (!io || !plugin || !uri) {
26 desc->plugin = plugin;
53 eprintf(
"You are using this API incorrectly\n");
54 eprintf(
"fd %d was probably not generated by this RzIO-instance\n",
desc->fd);
115 if (!plugin || !plugin->
open) {
130 desc->plugin = plugin;
141 if (!plugin || !plugin->
open || !plugin->
check || !plugin->
check(io, uri,
false)) {
150 desc->plugin = plugin;
189 if (
desc->io && (
desc->io->p_cache & 2)) {
203 if (
desc->io->cachemode) {
209 if (ret > 0 &&
desc->io->cachemode) {
211 }
else if ((ret > 0) &&
desc->io && (
desc->io->p_cache & 1)) {
252 bool ret =
desc->plugin->resize(
desc->io,
desc, newsize);
253 if (
desc->io &&
desc->io->p_cache) {
262 if (!
desc || !
desc->plugin || !
desc->plugin->is_blockdevice) {
265 return desc->plugin->is_blockdevice(
desc);
269 if (!
desc || !
desc->plugin || !
desc->plugin->is_chardevice) {
272 return desc->plugin->is_chardevice(
desc);
285 HtUP *cache =
desc->cache;
287 descx->
cache = cache;
294 if (
map->fd == fdx) {
296 }
else if (
map->fd ==
fd) {
305 return desc->plugin->isdbg;
318 if (!
desc->plugin->isdbg) {
321 if (!
desc->plugin->getpid) {
335 if (!
desc->plugin->isdbg) {
338 if (!
desc->plugin->gettid) {
345 if (!base || !
desc || !
desc->plugin || !
desc->plugin->isdbg || !
desc->plugin->getbase) {
348 return desc->plugin->getbase(
desc, base);
382 if (
desc->plugin &&
desc->plugin->close) {
size_t map(int syms, int left, int len)
RZ_API void Ht_() free(HtName_(Ht) *ht)
RZ_API RzIODesc * rz_io_desc_open_plugin(RzIO *io, RzIOPlugin *plugin, const char *uri, int perm, int mode)
RZ_IPI bool rz_io_desc_init(RzIO *io)
RZ_API void rz_io_desc_free(RzIODesc *desc)
RZ_API RzIODesc * rz_io_desc_open(RzIO *io, const char *uri, int perm, int mode)
RZ_API RzIODesc * rz_io_desc_get_prev(RzIO *io, RzIODesc *desc)
RZ_API RzIODesc * rz_io_desc_get_highest(RzIO *io)
RZ_API bool rz_io_desc_is_blockdevice(RzIODesc *desc)
static bool desc_fini_cb(void *user, void *data, ut32 id)
RZ_API ut64 rz_io_desc_seek(RzIODesc *desc, ut64 offset, int whence)
RZ_API bool rz_io_desc_add(RzIO *io, RzIODesc *desc)
RZ_API ut64 rz_io_desc_size(RzIODesc *desc)
RZ_API RzIODesc * rz_io_desc_new(RzIO *io, RzIOPlugin *plugin, const char *uri, int perm, int mode, void *data)
RZ_API RzIODesc * rz_io_desc_get_lowest(RzIO *io)
RZ_API bool rz_io_desc_exchange(RzIO *io, int fd, int fdx)
RZ_API int rz_io_desc_get_tid(RzIODesc *desc)
RZ_API bool rz_io_desc_resize(RzIODesc *desc, ut64 newsize)
RZ_API int rz_io_desc_read_at(RzIODesc *desc, ut64 addr, ut8 *buf, int len)
RZ_API RzIODesc * rz_io_desc_get(RzIO *io, int fd)
RZ_API int rz_io_desc_get_pid(RzIODesc *desc)
RZ_API bool rz_io_desc_is_chardevice(RzIODesc *desc)
RZ_API int rz_io_desc_write_at(RzIODesc *desc, ut64 addr, const ut8 *buf, int len)
RZ_IPI bool rz_io_desc_fini(RzIO *io)
RZ_API bool rz_io_desc_del(RzIO *io, int fd)
RZ_API int rz_io_desc_write(RzIODesc *desc, const ut8 *buf, int len)
RZ_API int rz_io_desc_read(RzIODesc *desc, ut8 *buf, int len)
RZ_API bool rz_io_desc_is_dbg(RzIODesc *desc)
RZ_API RzIODesc * rz_io_desc_get_next(RzIO *io, RzIODesc *desc)
RZ_API bool rz_io_desc_close(RzIODesc *desc)
RZ_API bool rz_io_desc_get_base(RzIODesc *desc, ut64 *base)
RZ_API ut8 * rz_io_desc_get_buf(RzIODesc *desc, RZ_OUT RZ_NONNULL ut64 *size)
Returns the underlying buffer of the io descriptor.
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
#define rz_return_val_if_fail(expr, val)
RZ_API void rz_event_send(RzEvent *ev, int type, void *data)
RZ_API bool rz_id_storage_set(RzIDStorage *storage, void *data, ut32 id)
RZ_API bool rz_id_pool_grab_id(RzIDPool *pool, ut32 *grabber)
RZ_API RzIDStorage * rz_id_storage_new(ut32 start_id, ut32 last_id)
RZ_API void rz_id_storage_free(RzIDStorage *storage)
RZ_API void * rz_id_storage_get(RzIDStorage *storage, ut32 id)
RZ_API bool rz_id_storage_foreach(RzIDStorage *storage, RzIDStorageForeachCb cb, void *user)
RZ_API void rz_id_storage_delete(RzIDStorage *storage, ut32 id)
RZ_API int rz_io_plugin_write(RzIODesc *desc, const ut8 *buf, int len)
RZ_API void rz_io_map_cleanup(RzIO *io)
RZ_API bool rz_io_cache_at(RzIO *io, ut64 addr)
RZ_API bool rz_io_cache_read(RzIO *io, ut64 addr, ut8 *buf, int len)
RZ_API bool rz_io_cache_write(RzIO *io, ut64 addr, const ut8 *buf, int len)
RZ_API void rz_io_desc_cache_fini(RzIODesc *desc)
RZ_API int rz_io_desc_cache_write(RzIODesc *desc, ut64 paddr, const ut8 *buf, int len)
RZ_API int rz_io_desc_cache_read(RzIODesc *desc, ut64 paddr, ut8 *buf, int len)
RZ_API int rz_io_plugin_read(RzIODesc *desc, ut8 *buf, int len)
RZ_API int rz_io_fd_get_highest(RzIO *io)
RZ_API void rz_io_desc_cache_cleanup(RzIODesc *desc)
RZ_API int rz_io_fd_get_prev(RzIO *io, int fd)
RZ_API RzIOPlugin * rz_io_plugin_resolve(RzIO *io, const char *filename, bool many)
RZ_API int rz_io_fd_get_lowest(RzIO *io)
RZ_API int rz_io_fd_get_next(RzIO *io, int fd)
RZ_API char RZ_API void rz_sys_backtrace(void)
Print the backtrace at the point this function is called from.
#define rz_pvector_foreach(vec, it)
bool(* check)(RzIO *io, const char *, bool many)
RzIODesc *(* open)(RzIO *io, const char *, int perm, int mode)
struct rz_io_desc_t * desc
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
static const z80_opcode fd[]