Rizin
unix-like reverse engineering framework and cli tools
rz_io.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2017-2020 condret <condr3t@protonmail.com>
2 // SPDX-FileCopyrightText: 2017-2020 pancake <pancake@nopcode.org>
3 // SPDX-FileCopyrightText: 2017-2020 alvaro <alvaro.felipe91@gmail.com>
4 // SPDX-License-Identifier: LGPL-3.0-only
5 
6 #ifndef RZ_IO_H
7 #define RZ_IO_H
8 
9 #include "rz_list.h"
10 #include <rz_util.h>
11 #include <rz_bind.h>
12 #include "rz_vector.h"
13 #include "rz_skyline.h"
14 
15 #define RZ_IO_SEEK_SET 0
16 #define RZ_IO_SEEK_CUR 1
17 #define RZ_IO_SEEK_END 2
18 
19 #define rz_io_map_get_from(map) map->itv.addr
20 #define rz_io_map_get_to(map) (rz_itv_size(map->itv) ? rz_itv_end(map->itv) - 1 : 0)
21 
22 #if HAVE_PTRACE
23 
24 #if __sun
25 #include <sys/types.h>
26 #else
27 #if DEBUGGER && HAVE_PTRACE
28 #include <sys/ptrace.h>
29 #endif
30 #endif
31 
32 #if (defined(__GLIBC__) && defined(__linux__))
33 typedef enum __ptrace_request rz_ptrace_request_t;
34 typedef void *rz_ptrace_data_t;
35 #define RZ_PTRACE_NODATA NULL
36 #else
37 #if __ANDROID__
38 typedef int rz_ptrace_request_t;
39 typedef void *rz_ptrace_data_t;
40 #define RZ_PTRACE_NODATA NULL
41 #elif __APPLE__ || __OpenBSD__ || __NetBSD__ || __FreeBSD__ || __DragonFly__
42 typedef int rz_ptrace_request_t;
43 typedef int rz_ptrace_data_t;
44 #define RZ_PTRACE_NODATA 0
45 #else
46 typedef int rz_ptrace_request_t;
47 typedef void *rz_ptrace_data_t;
48 #define RZ_PTRACE_NODATA NULL
49 #endif
50 #endif
51 #endif
52 
53 #if __cplusplus
54 extern "C" {
55 #endif
56 
58 
59 typedef struct rz_io_t {
60  struct rz_io_desc_t *desc; // XXX deprecate... we should use only the fd integer, not hold a weak pointer
62  int bits;
63  int va; // all of this config stuff must be in 1 int
64  int ff;
65  int Oxff;
66  size_t addrbytes;
67  int aslr;
68  int autofd;
69  int cached;
70  bool cachemode; // write in cache all the read operations (EXPERIMENTAL)
71  int p_cache;
73  RzPVector /*<RzIOMap *>*/ maps; // from tail backwards maps with higher priority are found
74  RzSkyline map_skyline; // map parts that are not covered by others
76  RzPVector /*<RzIOCache *>*/ cache;
80  RzList /*<RzIOPlugin *>*/ *plugins;
81  char *runprofile;
82  char *envprofile;
83 #if USE_PTRACE_WRAP
85 #endif
86 #if __WINDOWS__
87  struct w32dbg_wrap_instance_t *priv_w32dbg_wrap;
88 #endif
89  char *args;
93 } RzIO;
94 
95 typedef struct rz_io_desc_t {
96  int fd;
97  int perm;
98  char *uri;
99  char *name;
100  char *referer;
101  HtUP /*<ut64, RzIODescCache *>*/ *cache;
102  void *data;
106 
107 typedef struct {
109  int pid;
110  int tid;
111  void *data;
112 } RzIODescData;
113 
114 typedef struct rz_io_plugin_t {
115  const char *name;
116  const char *desc;
117  const char *version;
118  const char *author;
119  const char *license;
120  void *widget;
121  const char *uris;
123  int (*init)(void);
124  bool isdbg;
125  // int (*is_file_opened)(RzIO *io, RzIODesc *fd, const char *);
126  char *(*system)(RzIO *io, RzIODesc *fd, const char *);
127  RzIODesc *(*open)(RzIO *io, const char *, int perm, int mode);
128  RzList /*<RzIODesc *>*/ *(*open_many)(RzIO *io, const char *, int perm, int mode);
129  int (*read)(RzIO *io, RzIODesc *fd, ut8 *buf, int count);
130  ut64 (*lseek)(RzIO *io, RzIODesc *fd, ut64 offset, int whence);
131  int (*write)(RzIO *io, RzIODesc *fd, const ut8 *buf, int count);
139  bool (*accept)(RzIO *io, RzIODesc *desc, int fd);
140  int (*create)(RzIO *io, const char *file, int mode, int type);
141  bool (*check)(RzIO *io, const char *, bool many);
142  ut8 *(*get_buf)(RzIODesc *desc, ut64 *size);
144 
145 typedef struct rz_io_map_t {
146  int fd;
147  int perm;
150  ut64 delta; // paddr = itv.addr + delta
152 
159  void *user;
161 
162 typedef struct rz_io_cache_t {
166  int written;
168 
169 #define RZ_IO_DESC_CACHE_SIZE (sizeof(ut64) * 8)
170 typedef struct rz_io_desc_cache_t {
174 
175 typedef struct rz_event_io_write_t {
177  const ut8 *buf;
178  int len;
180 
181 typedef struct rz_event_io_desc_close_t {
184 
185 typedef struct rz_event_io_map_del_t {
188 
189 struct rz_io_bind_t;
190 
192 typedef bool (*RzIODescUse)(RzIO *io, int fd);
193 typedef RzIODesc *(*RzIODescGet)(RzIO *io, int fd);
195 typedef RzIODesc *(*RzIOOpen)(RzIO *io, const char *uri, int flags, int mode);
196 typedef RzIODesc *(*RzIOOpenAt)(RzIO *io, const char *uri, int flags, int mode, ut64 at, RZ_NULLABLE RZ_OUT RzIOMap **map);
197 typedef bool (*RzIOClose)(RzIO *io, int fd);
198 typedef bool (*RzIOReadAt)(RzIO *io, ut64 addr, ut8 *buf, int len);
199 typedef bool (*RzIOWriteAt)(RzIO *io, ut64 addr, const ut8 *buf, int len);
200 typedef char *(*RzIOSystem)(RzIO *io, const char *cmd);
201 typedef int (*RzIOFdOpen)(RzIO *io, const char *uri, int flags, int mode);
202 typedef bool (*RzIOFdClose)(RzIO *io, int fd);
203 typedef ut64 (*RzIOFdSeek)(RzIO *io, int fd, ut64 addr, int whence);
204 typedef ut64 (*RzIOFdSize)(RzIO *io, int fd);
205 typedef bool (*RzIOFdResize)(RzIO *io, int fd, ut64 newsize);
206 typedef ut64 (*RzIOP2V)(RzIO *io, ut64 pa);
207 typedef ut64 (*RzIOV2P)(RzIO *io, ut64 va);
208 typedef int (*RzIOFdRead)(RzIO *io, int fd, ut8 *buf, int len);
209 typedef int (*RzIOFdWrite)(RzIO *io, int fd, const ut8 *buf, int len);
210 typedef int (*RzIOFdReadAt)(RzIO *io, int fd, ut64 addr, ut8 *buf, int len);
211 typedef int (*RzIOFdWriteAt)(RzIO *io, int fd, ut64 addr, const ut8 *buf, int len);
212 typedef bool (*RzIOFdIsDbg)(RzIO *io, int fd);
213 typedef const char *(*RzIOFdGetName)(RzIO *io, int fd);
214 typedef RzList *(*RzIOFdGetMap)(RzIO *io, int fd);
215 typedef bool (*RzIOFdRemap)(RzIO *io, int fd, ut64 addr);
216 typedef ut8 *(*RzIOFdGetBuf)(RzIO *io, int fd, ut64 *size);
217 typedef bool (*RzIOIsValidOff)(RzIO *io, ut64 addr, int hasperm);
218 typedef RzIOMap *(*RzIOMapGet)(RzIO *io, ut64 addr);
219 typedef RzIOMap *(*RzIOMapGetPaddr)(RzIO *io, ut64 paddr);
221 typedef RzIOMap *(*RzIOMapAdd)(RzIO *io, int fd, int flags, ut64 delta, ut64 addr, ut64 size);
222 #if HAVE_PTRACE
223 typedef long (*RzIOPtraceFn)(RzIO *io, rz_ptrace_request_t request, pid_t pid, void *addr, rz_ptrace_data_t data);
224 typedef void *(*RzIOPtraceFuncFn)(RzIO *io, void *(*func)(void *), void *user);
225 #endif
226 #if __WINDOWS__
227 typedef struct w32dbg_wrap_instance_t *(*RzIOGetW32DbgWrap)(RzIO *io);
228 #endif
229 
230 typedef struct rz_io_bind_t {
231  int init;
245  RzIOFdSeek fd_seek; // needed for esil
248  RzIOFdRead fd_read; // needed for esil
249  RzIOFdWrite fd_write; // needed for esil
264 #if HAVE_PTRACE
265  RzIOPtraceFn ptrace;
266  RzIOPtraceFuncFn ptrace_func;
267 #endif
268 #if __WINDOWS__
269  RzIOGetW32DbgWrap get_w32dbg_wrap;
270 #endif
272 
273 // map.c
275 RZ_API void rz_io_map_init(RzIO *io);
276 RZ_API bool rz_io_map_remap(RzIO *io, ut32 id, ut64 addr);
277 RZ_API bool rz_io_map_remap_fd(RzIO *io, int fd, ut64 addr);
283 // same as rz_io_map_add but used when many maps need to be added. Call rz_io_update when all maps have been added.
285 RZ_API RzIOMap *rz_io_map_get(RzIO *io, ut64 addr); // returns the map at vaddr with the highest priority
286 // update the internal state of RzIO after a series of _batch operations
287 RZ_API void rz_io_update(RzIO *io);
289 RZ_API RzIOMap *rz_io_map_get_paddr(RzIO *io, ut64 paddr); // returns the map at paddr with the highest priority
290 RZ_API void rz_io_map_reset(RzIO *io);
291 RZ_API bool rz_io_map_del(RzIO *io, ut32 id);
292 RZ_API bool rz_io_map_del_for_fd(RzIO *io, int fd);
293 RZ_API bool rz_io_map_depriorize(RzIO *io, ut32 id);
294 RZ_API bool rz_io_map_priorize(RzIO *io, ut32 id);
295 RZ_API bool rz_io_map_priorize_for_fd(RzIO *io, int fd);
296 RZ_API void rz_io_map_cleanup(RzIO *io);
297 RZ_API void rz_io_map_fini(RzIO *io);
298 RZ_API void rz_io_map_set_name(RzIOMap *map, const char *name);
300 RZ_API RzList /*<RzIOMap *>*/ *rz_io_map_get_for_fd(RzIO *io, int fd);
301 RZ_API bool rz_io_map_resize(RzIO *io, ut32 id, ut64 newsize);
303 
304 // next free address to place a map.. maybe just unify
307 
308 // p2v/v2p
309 
310 RZ_API ut64 rz_io_p2v(RzIO *io, ut64 pa);
311 RZ_API ut64 rz_io_v2p(RzIO *io, ut64 va);
312 
313 // io.c
314 RZ_API RzIO *rz_io_new(void);
315 RZ_API RzIO *rz_io_init(RzIO *io);
316 RZ_API RzIODesc *rz_io_open_nomap(RzIO *io, const char *uri, int flags, int mode); // should return int
317 RZ_API RzIODesc *rz_io_open(RzIO *io, const char *uri, int flags, int mode);
318 RZ_API RzIODesc *rz_io_open_at(RzIO *io, const char *uri, int flags, int mode, ut64 at, RZ_NULLABLE RZ_OUT RzIOMap **map);
319 RZ_API RzList *rz_io_open_many(RzIO *io, const char *uri, int flags, int mode);
321 RZ_API bool rz_io_close(RzIO *io);
322 RZ_API bool rz_io_reopen(RzIO *io, int fd, int flags, int mode);
323 RZ_API int rz_io_close_all(RzIO *io);
324 RZ_API int rz_io_pread_at(RzIO *io, ut64 paddr, ut8 *buf, int len);
325 RZ_API int rz_io_pwrite_at(RzIO *io, ut64 paddr, const ut8 *buf, int len);
326 RZ_API bool rz_io_vread_at_mapped(RzIO *io, ut64 vaddr, ut8 *buf, int len);
327 RZ_API bool rz_io_read_at(RzIO *io, ut64 addr, ut8 *buf, int len);
328 RZ_API bool rz_io_read_at_mapped(RzIO *io, ut64 addr, ut8 *buf, int len);
329 RZ_API int rz_io_nread_at(RzIO *io, ut64 addr, ut8 *buf, int len);
330 RZ_API bool rz_io_write_at(RzIO *io, ut64 addr, const ut8 *buf, int len);
331 RZ_API bool rz_io_read(RzIO *io, ut8 *buf, int len);
332 RZ_API bool rz_io_write(RzIO *io, const ut8 *buf, int len);
334 RZ_API bool rz_io_is_listener(RzIO *io);
335 RZ_API char *rz_io_system(RzIO *io, const char *cmd);
336 RZ_API bool rz_io_resize(RzIO *io, ut64 newsize);
338 RZ_API bool rz_io_set_write_mask(RzIO *io, const ut8 *mask, int len);
339 RZ_API void rz_io_bind(RzIO *io, RzIOBind *bnd);
340 RZ_API bool rz_io_shift(RzIO *io, ut64 start, ut64 end, st64 move);
341 RZ_API ut64 rz_io_seek(RzIO *io, ut64 offset, int whence);
342 RZ_API int rz_io_fini(RzIO *io);
343 RZ_API void rz_io_free(RzIO *io);
344 #define rz_io_bind_init(x) memset(&x, 0, sizeof(x))
345 
346 RZ_API bool rz_io_plugin_init(RzIO *io);
347 RZ_API bool rz_io_plugin_add(RzIO *io, RZ_BORROW RzIOPlugin *plugin);
349 RZ_API int rz_io_plugin_write(RzIODesc *desc, const ut8 *buf, int len);
352 RZ_API RzIOPlugin *rz_io_plugin_resolve(RzIO *io, const char *filename, bool many);
353 RZ_API RzIOPlugin *rz_io_plugin_get_default(RzIO *io, const char *filename, bool many);
354 
355 // desc.c
356 RZ_API RzIODesc *rz_io_desc_new(RzIO *io, RzIOPlugin *plugin, const char *uri, int flags, int mode, void *data);
357 RZ_API RzIODesc *rz_io_desc_open(RzIO *io, const char *uri, int flags, int mode);
358 RZ_API RzIODesc *rz_io_desc_open_plugin(RzIO *io, RzIOPlugin *plugin, const char *uri, int flags, int mode);
361 RZ_API int rz_io_desc_write(RzIODesc *desc, const ut8 *buf, int count);
364 RZ_API bool rz_io_desc_del(RzIO *io, int fd);
367 RZ_API bool rz_io_desc_resize(RzIODesc *desc, ut64 newsize);
372 RZ_API bool rz_io_desc_exchange(RzIO *io, int fd, int fdx); // this should get 2 descs
379 
380 /* lifecycle */
381 RZ_IPI bool rz_io_desc_init(RzIO *io);
382 RZ_IPI bool rz_io_desc_fini(RzIO *io);
383 
384 /* io/cache.c */
386 RZ_API bool rz_io_cache_at(RzIO *io, ut64 addr);
388 RZ_API void rz_io_cache_init(RzIO *io);
389 RZ_API void rz_io_cache_fini(RzIO *io);
390 RZ_API void rz_io_cache_reset(RzIO *io, int set);
391 RZ_API bool rz_io_cache_write(RzIO *io, ut64 addr, const ut8 *buf, int len);
392 RZ_API bool rz_io_cache_read(RzIO *io, ut64 addr, ut8 *buf, int len);
393 
394 /* io/p_cache.c */
396 RZ_API int rz_io_desc_cache_write(RzIODesc *desc, ut64 paddr, const ut8 *buf, int len);
403 
404 /* io/fd.c */
405 RZ_API int rz_io_fd_open(RzIO *io, const char *uri, int flags, int mode);
406 RZ_API bool rz_io_fd_close(RzIO *io, int fd);
407 RZ_API int rz_io_fd_read(RzIO *io, int fd, ut8 *buf, int len);
408 RZ_API int rz_io_fd_write(RzIO *io, int fd, const ut8 *buf, int len);
409 RZ_API ut64 rz_io_fd_seek(RzIO *io, int fd, ut64 addr, int whence);
410 RZ_API ut64 rz_io_fd_size(RzIO *io, int fd);
412 RZ_API bool rz_io_fd_resize(RzIO *io, int fd, ut64 newsize);
413 RZ_API bool rz_io_fd_is_blockdevice(RzIO *io, int fd);
414 RZ_API bool rz_io_fd_is_chardevice(RzIO *io, int fd);
415 RZ_API int rz_io_fd_read_at(RzIO *io, int fd, ut64 addr, ut8 *buf, int len);
416 RZ_API int rz_io_fd_write_at(RzIO *io, int fd, ut64 addr, const ut8 *buf, int len);
417 RZ_API bool rz_io_fd_is_dbg(RzIO *io, int fd);
418 RZ_API int rz_io_fd_get_pid(RzIO *io, int fd);
419 RZ_API int rz_io_fd_get_tid(RzIO *io, int fd);
420 RZ_API bool rz_io_fd_get_base(RzIO *io, int fd, ut64 *base);
421 RZ_API const char *rz_io_fd_get_name(RzIO *io, int fd);
423 RZ_API int rz_io_fd_get_next(RzIO *io, int fd);
424 RZ_API int rz_io_fd_get_prev(RzIO *io, int fd);
427 RZ_API bool rz_io_use_fd(RzIO *io, int fd);
428 
429 #define rz_io_range_new() RZ_NEW0(RzIORange)
430 #define rz_io_range_free(x) free(x)
431 
432 /* io/ioutils.c */
433 RZ_API bool rz_io_is_valid_offset(RzIO *io, ut64 offset, int hasperm);
434 RZ_API bool rz_io_addr_is_mapped(RzIO *io, ut64 vaddr);
435 RZ_API bool rz_io_read_i(RzIO *io, ut64 addr, ut64 *val, int size, bool endian);
436 RZ_API bool rz_io_write_i(RzIO *io, ut64 addr, ut64 *val, int size, bool endian);
437 
438 #if HAVE_PTRACE
439 RZ_API long rz_io_ptrace(RzIO *io, rz_ptrace_request_t request, pid_t pid, void *addr, rz_ptrace_data_t data);
440 RZ_API pid_t rz_io_ptrace_fork(RzIO *io, void (*child_callback)(void *), void *child_callback_user);
441 RZ_API void *rz_io_ptrace_func(RzIO *io, void *(*func)(void *), void *user);
442 #endif
443 
444 #if __WINDOWS__
445 RZ_API struct w32dbg_wrap_instance_t *rz_io_get_w32dbg_wrap(RzIO *io);
446 #endif
447 
481 
482 #if __cplusplus
483 }
484 #endif
485 
486 #endif
size_t len
Definition: 6502dis.c:15
#define mask()
#define RZ_IPI
Definition: analysis_wasm.c:11
ut16 val
Definition: armass64_const.h:6
const char * desc
Definition: bin_vsf.c:19
#define RZ_API
static static sync static getppid static getegid const char static filename request
Definition: sflib.h:62
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void count
Definition: sflib.h:98
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void start
Definition: sflib.h:133
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags cmd
Definition: sflib.h:79
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags long
Definition: sflib.h:79
uint32_t ut32
size_t map(int syms, int left, int len)
Definition: enough.c:237
voidpf void uLong size
Definition: ioapi.h:138
const char * filename
Definition: ioapi.h:137
voidpf uLong offset
Definition: ioapi.h:144
const char int mode
Definition: ioapi.h:137
voidpf void * buf
Definition: ioapi.h:138
uint8_t ut8
Definition: lh5801.h:11
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc pid
Definition: sflib.h:64
static static fork const void static count static fd const char static mode const char static pathname const char static path const char static dev const char static group static getpid static getuid ptrace
Definition: sflib.h:57
int type
Definition: mipsasm.c:17
long ptrace_wrap(ptrace_wrap_instance *inst, ptrace_wrap_ptrace_request request, pid_t pid, void *addr, void *data)
Definition: ptrace_wrap.c:90
RZ_API RzIODesc * rz_io_open(RzIO *io, const char *uri, int flags, int mode)
Definition: io.c:156
RZ_API int rz_io_plugin_write(RzIODesc *desc, const ut8 *buf, int len)
Definition: io_plugin.c:89
RZ_API bool rz_io_plugin_init(RzIO *io)
Definition: io_plugin.c:32
RZ_API RzIOMap * rz_io_map_resolve(RzIO *io, ut32 id)
Definition: io_map.c:128
RZ_API bool rz_io_fd_resize(RzIO *io, int fd, ut64 newsize)
Definition: io_fd.c:58
struct rz_event_io_map_del_t RzEventIOMapDel
struct rz_io_bind_t RzIOBind
struct rz_io_desc_cache_t RzIODescCache
int(* RzIOFdReadAt)(RzIO *io, int fd, ut64 addr, ut8 *buf, int len)
Definition: rz_io.h:210
RZ_API int rz_io_pwrite_at(RzIO *io, ut64 paddr, const ut8 *buf, int len)
Definition: io.c:277
RZ_API bool rz_io_fd_is_dbg(RzIO *io, int fd)
Definition: io_fd.c:86
RZ_API char * rz_io_system(RzIO *io, const char *cmd)
Definition: io.c:411
RZ_API void rz_io_map_cleanup(RzIO *io)
Definition: io_map.c:287
RZ_API ut64 rz_io_fd_size(RzIO *io, int fd)
Definition: io_fd.c:42
RZ_API void rz_io_cache_init(RzIO *io)
Definition: io_cache.c:21
RZ_API const char * rz_io_fd_get_name(RzIO *io, int fd)
Definition: io_fd.c:112
RzIOPlugin rz_io_plugin_tcp
Definition: io_tcp.c:86
RZ_API int rz_io_cache_invalidate(RzIO *io, ut64 from, ut64 to)
Definition: io_cache.c:64
RZ_IPI bool rz_io_desc_init(RzIO *io)
Definition: io_desc.c:368
RzIOPlugin rz_io_plugin_procpid
Definition: io_procpid.c:138
RZ_API bool rz_io_fd_is_chardevice(RzIO *io, int fd)
Definition: io_fd.c:66
RZ_API ut64 rz_io_seek(RzIO *io, ut64 offset, int whence)
Definition: io.c:632
RzIODesc *(* RzIOOpen)(RzIO *io, const char *uri, int flags, int mode)
Definition: rz_io.h:195
RZ_API bool rz_io_cache_at(RzIO *io, ut64 addr)
Definition: io_cache.c:16
bool(* RzIOFdResize)(RzIO *io, int fd, ut64 newsize)
Definition: rz_io.h:205
RzIODesc *(* RzIODescGet)(RzIO *io, int fd)
Definition: rz_io.h:193
RZ_API bool rz_io_addr_is_mapped(RzIO *io, ut64 vaddr)
Definition: ioutils.c:11
RZ_API bool rz_io_read_at(RzIO *io, ut64 addr, ut8 *buf, int len)
Definition: io.c:300
RZ_API bool rz_io_map_exists_for_id(RzIO *io, ut32 id)
Definition: io_map.c:124
RZ_API RzIODesc * rz_io_desc_open_plugin(RzIO *io, RzIOPlugin *plugin, const char *uri, int flags, int mode)
Definition: io_desc.c:139
RzIOPlugin rz_io_plugin_null
Definition: io_null.c:105
struct rz_event_io_write_t RzEventIOWrite
RZ_API void rz_io_cache_reset(RzIO *io, int set)
Definition: io_cache.c:57
char *(* RzIOSystem)(RzIO *io, const char *cmd)
Definition: rz_io.h:200
RZ_API void rz_io_desc_free(RzIODesc *desc)
Definition: io_desc.c:35
RzIOPlugin rz_io_plugin_gprobe
Definition: io_gprobe.c:1228
RZ_API void rz_io_map_init(RzIO *io)
Definition: io_map.c:101
RZ_API bool rz_io_fd_get_base(RzIO *io, int fd, ut64 *base)
Definition: io_fd.c:106
RzIOPlugin rz_io_plugin_gdb
Definition: io_gdb.c:410
int(* RzIOGetCurrentFd)(RzIO *io)
Definition: rz_io.h:191
int(* RzIOFdWrite)(RzIO *io, int fd, const ut8 *buf, int len)
Definition: rz_io.h:209
RZ_API bool rz_io_cache_read(RzIO *io, ut64 addr, ut8 *buf, int len)
Definition: io_cache.c:131
RzIOPlugin rz_io_plugin_bochs
Definition: io_bochs.c:106
RzIOPlugin rz_io_plugin_gzip
Definition: io_gzip.c:181
RZ_API int rz_io_fd_get_tid(RzIO *io, int fd)
Definition: io_fd.c:100
bool(* RzIOClose)(RzIO *io, int fd)
Definition: rz_io.h:197
RzIOPlugin rz_io_plugin_w32dbg
Definition: io_w32dbg.c:215
RZ_API bool rz_io_desc_is_blockdevice(RzIODesc *desc)
Definition: io_desc.c:261
RZ_API RzList * rz_io_open_many(RzIO *io, const char *uri, int flags, int mode)
Definition: io.c:201
RZ_API bool rz_io_map_del_for_fd(RzIO *io, int fd)
Definition: io_map.c:208
RZ_API int rz_io_desc_write(RzIODesc *desc, const ut8 *buf, int count)
Definition: io_desc.c:183
RZ_API bool rz_io_desc_cache_commit(RzIODesc *desc)
Definition: p_cache.c:302
RZ_API ut64 rz_io_desc_seek(RzIODesc *desc, ut64 offset, int whence)
Definition: io_desc.c:217
RZ_API bool rz_io_map_del(RzIO *io, ut32 id)
Definition: io_map.c:192
RZ_LIB_VERSION_HEADER(rz_io)
RZ_API bool rz_io_extend_at(RzIO *io, ut64 addr, ut64 size)
Extend the RzIODesc at addr by inserting size 0 bytes.
Definition: io.c:453
RZ_API int rz_io_fd_open(RzIO *io, const char *uri, int flags, int mode)
Definition: io_fd.c:6
RZ_API bool rz_io_shift(RzIO *io, ut64 start, ut64 end, st64 move)
Definition: io.c:596
RZ_API bool rz_io_resize(RzIO *io, ut64 newsize)
Definition: io.c:418
RzIOPlugin rz_io_plugin_ihex
Definition: io_ihex.c:436
ut64(* RzIOV2P)(RzIO *io, ut64 va)
Definition: rz_io.h:207
RZ_API bool rz_io_map_exists(RzIO *io, RzIOMap *map)
Definition: io_map.c:111
RzIOPlugin rz_io_plugin_sparse
Definition: io_sparse.c:110
RZ_API bool rz_io_desc_add(RzIO *io, RzIODesc *desc)
Definition: io_desc.c:49
RZ_API void rz_io_map_del_name(RzIOMap *map)
Definition: io_map.c:340
RZ_API bool rz_io_map_remap_fd(RzIO *io, int fd, ut64 addr)
Definition: io_map.c:69
RzIOPlugin rz_io_plugin_shm
Definition: io_shm.c:267
bool(* RzIOWriteAt)(RzIO *io, ut64 addr, const ut8 *buf, int len)
Definition: rz_io.h:199
RZ_API bool rz_io_cache_write(RzIO *io, ut64 addr, const ut8 *buf, int len)
Definition: io_cache.c:93
bool(* RzIOFdIsDbg)(RzIO *io, int fd)
Definition: rz_io.h:212
RZ_API bool rz_io_map_depriorize(RzIO *io, ut32 id)
Definition: io_map.c:248
RZ_API bool rz_io_vread_at_mapped(RzIO *io, ut64 vaddr, ut8 *buf, int len)
Definition: io.c:283
RzIOPlugin rz_io_plugin_srec
Definition: io_srec.c:549
RZ_API RzIODesc * rz_io_open_at(RzIO *io, const char *uri, int flags, int mode, ut64 at, RZ_NULLABLE RZ_OUT RzIOMap **map)
Open a file and directly map it at the given offset.
Definition: io.c:177
RZ_API ut64 rz_io_desc_size(RzIODesc *desc)
Definition: io_desc.c:224
RZ_API ut64 rz_io_map_next_available(RzIO *io, ut64 addr, ut64 size, ut64 load_align)
Definition: io_map.c:347
RzIOPlugin rz_io_plugin_self
Definition: io_self.c:848
RZ_API void rz_io_desc_cache_fini(RzIODesc *desc)
Definition: p_cache.c:358
RZ_API bool rz_io_desc_exchange(RzIO *io, int fd, int fdx)
Definition: io_desc.c:275
bool(* RzIOFdClose)(RzIO *io, int fd)
Definition: rz_io.h:202
RZ_API void rz_io_free(RzIO *io)
Definition: io.c:126
ut64(* RzIOP2V)(RzIO *io, ut64 pa)
Definition: rz_io.h:206
RZ_API int rz_io_desc_get_tid(RzIODesc *desc)
Definition: io_desc.c:327
RZ_API bool rz_io_set_write_mask(RzIO *io, const ut8 *mask, int len)
Set a mask that is used on all following write operations.
Definition: io.c:517
RZ_API RzIODesc * rz_io_desc_new(RzIO *io, RzIOPlugin *plugin, const char *uri, int flags, int mode, void *data)
Definition: io_desc.c:11
RZ_API bool rz_io_map_priorize(RzIO *io, ut32 id)
Definition: io_map.c:232
RZ_API ut64 rz_io_map_next_address(RzIO *io, ut64 addr)
Definition: io_map.c:371
RzIOPlugin rz_io_plugin_zip
Definition: io_zip.c:675
RZ_API int rz_io_desc_cache_write(RzIODesc *desc, ut64 paddr, const ut8 *buf, int len)
Definition: p_cache.c:86
RZ_API ut64 rz_io_size(RzIO *io)
Definition: io.c:399
RZ_API bool rz_io_fd_is_blockdevice(RzIO *io, int fd)
Definition: io_fd.c:62
RzIOPlugin rz_io_plugin_http
Definition: io_http.c:34
RZ_API ut8 * rz_io_fd_get_buf(RzIO *io, int fd, RZ_OUT RZ_NONNULL ut64 *size)
Returns the underlying buffer of the file descriptor.
Definition: io_fd.c:53
RZ_API int rz_io_fd_read(RzIO *io, int fd, ut8 *buf, int len)
Definition: io_fd.c:16
RZ_API ut64 rz_io_v2p(RzIO *io, ut64 va)
Definition: io.c:541
RZ_API bool rz_io_desc_resize(RzIODesc *desc, ut64 newsize)
Definition: io_desc.c:250
RZ_API int rz_io_desc_read_at(RzIODesc *desc, ut64 addr, ut8 *buf, int len)
Definition: io_desc.c:351
RZ_API int rz_io_desc_cache_read(RzIODesc *desc, ut64 paddr, ut8 *buf, int len)
Definition: p_cache.c:142
RzIOPlugin rz_io_plugin_rzk
Definition: io_rzk.c:137
RzIOMap *(* RzIOMapGetPaddr)(RzIO *io, ut64 paddr)
Definition: rz_io.h:219
RZ_API bool rz_io_read_i(RzIO *io, ut64 addr, ut64 *val, int size, bool endian)
Definition: ioutils.c:41
RZ_API int rz_io_fd_read_at(RzIO *io, int fd, ut64 addr, ut8 *buf, int len)
Definition: io_fd.c:71
const char *(* RzIOFdGetName)(RzIO *io, int fd)
Definition: rz_io.h:213
RZ_API RzIOMap * rz_io_map_get_paddr(RzIO *io, ut64 paddr)
Definition: io_map.c:163
struct rz_event_io_desc_close_t RzEventIODescClose
struct rz_io_cache_t RzIOCache
RZ_API void rz_io_map_reset(RzIO *io)
Definition: io_map.c:186
RzIOPlugin rz_io_plugin_bfdbg
Definition: io_bfdbg.c:197
RZ_API RzIOMap * rz_io_map_add_batch(RzIO *io, int fd, int flags, ut64 delta, ut64 addr, ut64 size)
Definition: io_map.c:155
RZ_API RzIOMap * rz_io_map_get(RzIO *io, ut64 addr)
Definition: io_map.c:176
RZ_API bool rz_io_map_priorize_for_fd(RzIO *io, int fd)
Definition: io_map.c:264
RZ_API RzList * rz_io_desc_cache_list(RzIODesc *desc)
Definition: p_cache.c:249
RZ_API int rz_io_desc_read(RzIODesc *desc, ut8 *buf, int count)
Definition: io_desc.c:197
RZ_API bool rz_io_map_remap(RzIO *io, ut32 id, ut64 addr)
Definition: io_map.c:54
RZ_API RzIODesc * rz_io_desc_get(RzIO *io, int fd)
Definition: io_desc.c:73
bool(* RzIOAddrIsMapped)(RzIO *io, ut64 addr)
Definition: rz_io.h:220
RZ_API int rz_io_desc_get_pid(RzIODesc *desc)
Definition: io_desc.c:310
RZ_API RzList * rz_io_map_get_for_fd(RzIO *io, int fd)
Definition: io_map.c:388
RzIOPlugin rz_io_plugin_rzpipe
Definition: io_rzpipe.c:177
RzIOPlugin rz_io_plugin_w32
Definition: io_w32.c:102
RZ_API void rz_io_bind(RzIO *io, RzIOBind *bnd)
Definition: io.c:550
RZ_API int rz_io_plugin_read(RzIODesc *desc, ut8 *buf, int len)
Definition: io_plugin.c:79
ut64(* RzIODescSize)(RzIODesc *desc)
Definition: rz_io.h:194
RZ_API bool rz_io_desc_is_chardevice(RzIODesc *desc)
Definition: io_desc.c:268
RzIOPlugin rz_io_plugin_dmp
Definition: io_dmp.c:162
RZ_API bool rz_io_is_listener(RzIO *io)
Definition: io.c:404
struct rz_io_t RzIO
RzIOMap *(* RzIOMapGet)(RzIO *io, ut64 addr)
Definition: rz_io.h:218
RzIOPlugin rz_io_plugin_default
Definition: io_default.c:200
RZ_API void rz_io_cache_fini(RzIO *io)
Definition: io_cache.c:28
RZ_API int rz_io_desc_write_at(RzIODesc *desc, ut64 addr, const ut8 *buf, int len)
Definition: io_desc.c:358
RZ_API bool rz_io_map_resize(RzIO *io, ut32 id, ut64 newsize)
Definition: io_map.c:403
RZ_API void rz_io_update(RzIO *io)
Definition: io_map.c:159
RzIOPlugin rz_io_plugin_ptrace
Definition: io_ptrace.c:356
RZ_API int rz_io_close_all(RzIO *io)
Definition: io.c:258
RZ_API bool rz_io_read_at_mapped(RzIO *io, ut64 addr, ut8 *buf, int len)
Definition: io.c:318
RZ_API ut64 rz_io_p2v(RzIO *io, ut64 pa)
Definition: io.c:533
RZ_API bool rz_io_map_is_mapped(RzIO *io, ut64 addr)
Definition: io_map.c:181
RZ_IPI bool rz_io_desc_fini(RzIO *io)
Definition: io_desc.c:390
bool(* RzIODescUse)(RzIO *io, int fd)
Definition: rz_io.h:192
RZ_API int rz_io_fini(RzIO *io)
Definition: io.c:724
RZ_API int rz_io_plugin_read_at(RzIODesc *desc, ut64 addr, ut8 *buf, int len)
Definition: io_plugin.c:103
RZ_API int rz_io_fd_write_at(RzIO *io, int fd, ut64 addr, const ut8 *buf, int len)
Definition: io_fd.c:80
int(* RzIOFdWriteAt)(RzIO *io, int fd, ut64 addr, const ut8 *buf, int len)
Definition: rz_io.h:211
ut8 *(* RzIOFdGetBuf)(RzIO *io, int fd, ut64 *size)
Definition: rz_io.h:216
RZ_API bool rz_io_desc_del(RzIO *io, int fd)
Definition: io_desc.c:61
bool(* RzIOReadAt)(RzIO *io, ut64 addr, ut8 *buf, int len)
Definition: rz_io.h:198
ut64(* RzIOFdSeek)(RzIO *io, int fd, ut64 addr, int whence)
Definition: rz_io.h:203
ut64(* RzIOFdSize)(RzIO *io, int fd)
Definition: rz_io.h:204
RZ_API RZ_BORROW RzPVector * rz_io_maps(RzIO *io)
Returns the pointer to vector containing maps list.
Definition: io_map.c:435
RZ_API bool rz_io_reopen(RzIO *io, int fd, int flags, int mode)
Definition: io.c:231
RzIOPlugin rz_io_plugin_windbg
Definition: io_windbg.c:684
RZ_API bool rz_io_close(RzIO *io)
Definition: io.c:441
RzIOPlugin rz_io_plugin_rap
Definition: io_rap.c:279
bool(* RzIOIsValidOff)(RzIO *io, ut64 addr, int hasperm)
Definition: rz_io.h:217
RZ_API bool rz_io_read(RzIO *io, ut8 *buf, int len)
Definition: io.c:383
struct rz_io_desc_t RzIODesc
RZ_API RzIO * rz_io_init(RzIO *io)
Definition: io.c:114
RzIODesc *(* RzIOOpenAt)(RzIO *io, const char *uri, int flags, int mode, ut64 at, RZ_NULLABLE RZ_OUT RzIOMap **map)
Definition: rz_io.h:196
RZ_API bool rz_io_is_valid_offset(RzIO *io, ut64 offset, int hasperm)
Definition: ioutils.c:20
RZ_API int rz_io_fd_write(RzIO *io, int fd, const ut8 *buf, int len)
Definition: io_fd.c:26
RzIOMap *(* RzIOMapAdd)(RzIO *io, int fd, int flags, ut64 delta, ut64 addr, ut64 size)
Definition: rz_io.h:221
RzIOPlugin rz_io_plugin_malloc
Definition: io_malloc.c:50
RZ_API int rz_io_fd_get_current(RzIO *io)
Definition: io_fd.c:135
RZ_API RzIODesc * rz_io_open_buffer(RzIO *io, RzBuffer *b, int flags, int mode)
Definition: io.c:133
RZ_API RzIOPlugin * rz_io_plugin_get_default(RzIO *io, const char *filename, bool many)
Definition: io_plugin.c:47
RzIOPlugin rz_io_plugin_winedbg
Definition: io_winedbg.c:366
RzIOPlugin rz_io_plugin_mach
Definition: io_mach.c:569
RZ_API bool rz_io_write_at(RzIO *io, ut64 addr, const ut8 *buf, int len)
Definition: io.c:358
RZ_API RzIODesc * rz_io_open_nomap(RzIO *io, const char *uri, int flags, int mode)
Definition: io.c:145
RZ_API int rz_io_fd_get_pid(RzIO *io, int fd)
Definition: io_fd.c:92
RZ_API ut64 rz_io_fd_seek(RzIO *io, int fd, ut64 addr, int whence)
Definition: io_fd.c:35
RZ_API int rz_io_fd_get_highest(RzIO *io)
Definition: io_fd.c:161
RZ_API void rz_io_cache_commit(RzIO *io, ut64 from, ut64 to)
Definition: io_cache.c:35
RZ_API void rz_io_desc_cache_fini_all(RzIO *io)
Definition: p_cache.c:362
RZ_API bool rz_io_use_fd(RzIO *io, int fd)
Definition: io_fd.c:118
RzIOPlugin rz_io_plugin_winkd
Definition: io_winkd.c:148
RZ_API int rz_io_pread_at(RzIO *io, ut64 paddr, ut8 *buf, int len)
Definition: io.c:269
RZ_API void rz_io_desc_cache_cleanup(RzIODesc *desc)
Definition: p_cache.c:343
RzList *(* RzIOFdGetMap)(RzIO *io, int fd)
Definition: rz_io.h:214
int(* RzIOFdOpen)(RzIO *io, const char *uri, int flags, int mode)
Definition: rz_io.h:201
RZ_API bool rz_io_desc_cache_init(RzIODesc *desc)
Definition: p_cache.c:79
bool(* RzIOFdRemap)(RzIO *io, int fd, ut64 addr)
Definition: rz_io.h:215
RzIOPlugin rz_io_plugin_qnx
Definition: io_qnx.c:148
RZ_API int rz_io_nread_at(RzIO *io, ut64 addr, ut8 *buf, int len)
Definition: io.c:338
RZ_API RzIOMap * rz_io_map_new(RzIO *io, int fd, int flags, ut64 delta, ut64 addr, ut64 size)
Definition: io_map.c:50
RZ_API bool rz_io_desc_is_dbg(RzIODesc *desc)
Definition: io_desc.c:303
RZ_API void rz_io_map_set_name(RzIOMap *map, const char *name)
Definition: io_map.c:332
RZ_API int rz_io_fd_get_prev(RzIO *io, int fd)
Definition: io_fd.c:152
RZ_API RzIOMap * rz_io_map_add(RzIO *io, int fd, int flags, ut64 delta, ut64 addr, ut64 size)
Definition: io_map.c:151
RZ_API void rz_io_map_fini(RzIO *io)
Definition: io_map.c:318
RzIOPlugin rz_io_plugin_fd
Definition: io_fd.c:84
int(* RzIOFdRead)(RzIO *io, int fd, ut8 *buf, int len)
Definition: rz_io.h:208
RZ_API bool rz_io_write(RzIO *io, const ut8 *buf, int len)
Definition: io.c:391
RZ_API ut64 rz_io_map_location(RzIO *io, ut64 size)
Returns a memory location that can hold enough bytes without overlapping.
Definition: io_map.c:425
struct rz_io_map_t RzIOMap
RZ_API bool rz_io_fd_close(RzIO *io, int fd)
Definition: io_fd.c:11
RzIOPlugin rz_io_plugin_debug
Definition: io_debug.c:571
RZ_API int rz_io_plugin_write_at(RzIODesc *desc, ut64 addr, const ut8 *buf, int len)
Definition: io_plugin.c:110
RZ_API bool rz_io_write_i(RzIO *io, ut64 addr, ut64 *val, int size, bool endian)
Definition: ioutils.c:53
RZ_API RzIOPlugin * rz_io_plugin_resolve(RzIO *io, const char *filename, bool many)
Definition: io_plugin.c:54
RzIOPlugin rz_io_plugin_ar
Definition: io_ar.c:135
RZ_API int rz_io_fd_get_lowest(RzIO *io)
Definition: io_fd.c:170
RZ_API RzIO * rz_io_new(void)
Definition: io.c:110
#define RZ_IO_DESC_CACHE_SIZE
Definition: rz_io.h:169
RzIOPlugin rz_io_plugin_rzweb
Definition: io_rzweb.c:156
RZ_API bool rz_io_plugin_add(RzIO *io, RZ_BORROW RzIOPlugin *plugin)
Definition: io_plugin.c:12
struct rz_io_plugin_t RzIOPlugin
RZ_API int rz_io_fd_get_next(RzIO *io, int fd)
Definition: io_fd.c:143
RZ_API bool rz_io_desc_close(RzIODesc *desc)
Definition: io_desc.c:165
RZ_API bool rz_io_desc_get_base(RzIODesc *desc, ut64 *base)
Definition: io_desc.c:344
RZ_API RzIODesc * rz_io_desc_open(RzIO *io, const char *uri, int flags, int mode)
Definition: io_desc.c:112
RZ_API ut8 * rz_io_desc_get_buf(RzIODesc *desc, RZ_OUT RZ_NONNULL ut64 *size)
Returns the underlying buffer of the io descriptor.
Definition: io_desc.c:241
#define RZ_NULLABLE
Definition: rz_types.h:65
#define RZ_OUT
Definition: rz_types.h:51
#define RZ_NONNULL
Definition: rz_types.h:64
int(* PrintfCallback)(const char *str,...) RZ_PRINTF_CHECK(1
Definition: rz_types.h:233
#define RZ_BORROW
Definition: rz_types.h:63
#define st64
Definition: rz_types_base.h:10
static struct sockaddr static addrlen static backlog const void static flags void struct sockaddr from
Definition: sfsocketcall.h:123
static struct sockaddr static addrlen static backlog const void static flags void struct sockaddr socklen_t static fromlen const void const struct sockaddr to
Definition: sfsocketcall.h:125
static struct sockaddr static addrlen static backlog const void static flags void flags
Definition: sfsocketcall.h:123
static int
Definition: sfsocketcall.h:114
int pid_t
Definition: sftypes.h:38
__ptrace_request
Definition: sftypes.h:552
#define b(i)
Definition: sha256.c:42
int pid
Definition: rz_io.h:109
ut64 magic
Definition: rz_io.h:108
int tid
Definition: rz_io.h:110
void * data
Definition: rz_io.h:111
Definition: z80asm.h:102
RzIOMap * map
Definition: rz_io.h:186
const ut8 * buf
Definition: rz_io.h:177
RzIOFdResize fd_resize
Definition: rz_io.h:247
RzIOOpen open
Definition: rz_io.h:237
RzIOReadAt read_at
Definition: rz_io.h:240
RzIOIsValidOff is_valid_offset
Definition: rz_io.h:257
RzIOFdOpen fd_open
Definition: rz_io.h:243
RzIOClose close
Definition: rz_io.h:239
RzIOV2P v2p
Definition: rz_io.h:262
RzIOMapGet map_get
Definition: rz_io.h:259
RzIOP2V p2v
Definition: rz_io.h:263
RzIODescSize desc_size
Definition: rz_io.h:236
RzIOAddrIsMapped addr_is_mapped
Definition: rz_io.h:258
RzIOSystem system
Definition: rz_io.h:242
RzIOMapAdd map_add
Definition: rz_io.h:261
RzIODescUse desc_use
Definition: rz_io.h:234
RzIOOpenAt open_at
Definition: rz_io.h:238
RzIOGetCurrentFd fd_get_current
Definition: rz_io.h:233
RzIOFdSeek fd_seek
Definition: rz_io.h:245
RzIOWriteAt write_at
Definition: rz_io.h:241
RzIOFdGetBuf fd_getbuf
Definition: rz_io.h:256
RzIO * io
Definition: rz_io.h:232
RzIOFdWrite fd_write
Definition: rz_io.h:249
RzIOFdGetMap fd_get_map
Definition: rz_io.h:254
RzIOFdIsDbg fd_is_dbg
Definition: rz_io.h:252
RzIOFdReadAt fd_read_at
Definition: rz_io.h:250
RzIOFdClose fd_close
Definition: rz_io.h:244
RzIOFdGetName fd_get_name
Definition: rz_io.h:253
RzIOFdRemap fd_remap
Definition: rz_io.h:255
RzIOFdWriteAt fd_write_at
Definition: rz_io.h:251
RzIOFdSize fd_size
Definition: rz_io.h:246
RzIOFdRead fd_read
Definition: rz_io.h:248
RzIOMapGetPaddr map_get_paddr
Definition: rz_io.h:260
int init
Definition: rz_io.h:231
RzIODescGet desc_get
Definition: rz_io.h:235
RzInterval itv
Definition: rz_io.h:163
int written
Definition: rz_io.h:166
ut8 * odata
Definition: rz_io.h:165
ut8 * data
Definition: rz_io.h:164
ut8 cdata[RZ_IO_DESC_CACHE_SIZE]
Definition: rz_io.h:172
void * data
Definition: rz_io.h:102
char * name
Definition: rz_io.h:99
int fd
Definition: rz_io.h:96
char * uri
Definition: rz_io.h:98
RzIO * io
Definition: rz_io.h:104
struct rz_io_plugin_t * plugin
Definition: rz_io.h:103
int perm
Definition: rz_io.h:97
char * referer
Definition: rz_io.h:100
HtUP * cache
Definition: rz_io.h:101
int perm
Definition: rz_io.h:147
ut32 id
Definition: rz_io.h:148
ut64 delta
Definition: rz_io.h:150
int fd
Definition: rz_io.h:146
void * user
Uninterpreted data to be injected from outside.
Definition: rz_io.h:159
RZ_NULLABLE char * name
Definition: rz_io.h:151
RzInterval itv
Definition: rz_io.h:149
int(* init)(void)
Definition: rz_io.h:123
int(* read)(RzIO *io, RzIODesc *fd, ut8 *buf, int count)
Definition: rz_io.h:129
void * widget
Definition: rz_io.h:120
int(* gettid)(RzIODesc *desc)
Definition: rz_io.h:136
bool(* getbase)(RzIODesc *desc, ut64 *base)
Definition: rz_io.h:137
int(* listener)(RzIODesc *io)
Definition: rz_io.h:122
const char * name
Definition: rz_io.h:115
const char * version
Definition: rz_io.h:117
bool(* resize)(RzIO *io, RzIODesc *fd, ut64 size)
Definition: rz_io.h:138
bool(* is_blockdevice)(RzIODesc *desc)
Definition: rz_io.h:133
int(* create)(RzIO *io, const char *file, int mode, int type)
Definition: rz_io.h:140
const char * uris
Definition: rz_io.h:121
int(* close)(RzIODesc *desc)
Definition: rz_io.h:132
int(* write)(RzIO *io, RzIODesc *fd, const ut8 *buf, int count)
Definition: rz_io.h:131
int(* getpid)(RzIODesc *desc)
Definition: rz_io.h:135
bool(* check)(RzIO *io, const char *, bool many)
Definition: rz_io.h:141
const char * license
Definition: rz_io.h:119
bool isdbg
Definition: rz_io.h:124
bool(* is_chardevice)(RzIODesc *desc)
Definition: rz_io.h:134
const char * author
Definition: rz_io.h:118
const char * desc
Definition: rz_io.h:116
bool(* accept)(RzIO *io, RzIODesc *desc, int fd)
Definition: rz_io.h:139
ut64(* lseek)(RzIO *io, RzIODesc *fd, ut64 offset, int whence)
Definition: rz_io.h:130
Definition: rz_io.h:59
int ff
Definition: rz_io.h:64
bool cachemode
Definition: rz_io.h:70
int Oxff
Definition: rz_io.h:65
RzPVector maps
Definition: rz_io.h:73
RzCoreBind corebind
Definition: rz_io.h:92
int autofd
Definition: rz_io.h:68
char * runprofile
Definition: rz_io.h:81
ut8 * write_mask
Definition: rz_io.h:78
RzEvent * event
Definition: rz_io.h:90
int cached
Definition: rz_io.h:69
RzIDPool * map_ids
Definition: rz_io.h:72
int aslr
Definition: rz_io.h:67
char * envprofile
Definition: rz_io.h:82
ut64 off
Definition: rz_io.h:61
RzIDStorage * files
Definition: rz_io.h:75
size_t addrbytes
Definition: rz_io.h:66
int write_mask_len
Definition: rz_io.h:79
RzSkyline map_skyline
Definition: rz_io.h:74
char * args
Definition: rz_io.h:89
int bits
Definition: rz_io.h:62
PrintfCallback cb_printf
Definition: rz_io.h:91
RzSkyline cache_skyline
Definition: rz_io.h:77
struct rz_io_desc_t * desc
Definition: rz_io.h:60
int p_cache
Definition: rz_io.h:71
int va
Definition: rz_io.h:63
RzPVector cache
Definition: rz_io.h:76
RzList * plugins
Definition: rz_io.h:80
#define bool
Definition: sysdefs.h:146
static st64 delta
Definition: vmenus.c:2425
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
static const z80_opcode fd[]
Definition: z80_tab.h:997
static int file
Definition: z80asm.c:58
static int addr
Definition: z80asm.c:58