8 #define IRAPI static inline
19 return (!strncmp(
file,
"qnx://", 6));
31 ut32 packets = sz / size_max;
32 ut32 last = sz % size_max;
41 for (
x = 0;
x < packets;
x++) {
57 ut32 x, size_max = 500;
58 ut32 packets = sz / size_max;
59 ut32 last = sz % size_max;
68 for (
x = 0;
x < packets;
x++) {
74 (
buf +
x * size_max), last);
82 char host[128], *port, *
p;
91 strncpy(host,
file + 6,
sizeof(host) - 1);
92 host[
sizeof(host) - 1] =
'\0';
93 port = strchr(host,
':');
95 eprintf(
"Port not specified. Please use qnx://[host]:[port]\n");
100 p = strchr(port,
'/');
107 int i_port = atoi(port);
113 eprintf(
"qnx.io.open: Cannot connect to host.\n");
151 .desc =
"Attach to QNX pdebug instance",
163 #ifndef RZ_PLUGIN_INCORE
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
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
RZ_API void Ht_() free(HtName_(Ht) *ht)
static int debug_qnx_read_at(ut8 *buf, int sz, ut64 addr)
static int __read(RzIO *io, RzIODesc *fd, ut8 *buf, int count)
static bool __plugin_open(RzIO *io, const char *file, bool many)
RZ_API RzLibStruct rizin_plugin
static RzIODesc * __open(RzIO *io, const char *file, int rw, int mode)
static int __write(RzIO *io, RzIODesc *fd, const ut8 *buf, int count)
static int debug_qnx_write_at(const ut8 *buf, int sz, ut64 addr)
static ut64 __lseek(RzIO *io, RzIODesc *fd, ut64 offset, int whence)
static int __close(RzIODesc *fd)
RzIOPlugin rz_io_plugin_qnx
static char * __system(RzIO *io, RzIODesc *fd, const char *cmd)
return memset(p, 0, total)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
int qnxr_connect(libqnxr_t *g, const char *server, int port)
int qnxr_write_memory(libqnxr_t *g, ut64 address, const ut8 *data, ut64 len)
int qnxr_read_memory(libqnxr_t *g, ut64 address, ut8 *data, ut64 len)
int qnxr_init(libqnxr_t *g)
RZ_API RzIODesc * rz_io_desc_new(RzIO *io, RzIOPlugin *plugin, const char *uri, int flags, int mode, void *data)
RZ_API void * rz_mem_dup(const void *s, int l)
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
static const z80_opcode fd[]