Rizin
unix-like reverse engineering framework and cli tools
|
#include <errno.h>
#include <rz_debug.h>
#include "libqnxr.h"
#include "core.h"
#include "signal.h"
#include "sigutil.h"
#include "packet.h"
Go to the source code of this file.
Macros | |
#define | MAX_TRAN_TRIES 3 |
#define | HOST_QNX_PROTOVER_MAJOR 0 |
#define | HOST_QNX_PROTOVER_MINOR 3 |
Variables | |
ptid_t | null_ptid = { 0, 0 } |
static registers_t | x86_32 [] |
static registers_t | arm32 [] |
int _qnxr_remove_bp | ( | libqnxr_t * | g, |
ut64 | address, | ||
enum Breakpoint | type | ||
) |
Definition at line 629 of file core.c.
References DSMSG_BRK_EXEC, DSrMsg_err, DStMsg_brk, EXTRACT_UNSIGNED_INTEGER, g, nto_send(), nto_send_init(), and SET_CHANNEL_DEBUG.
Referenced by qnxr_remove_bp(), and qnxr_remove_hwbp().
int _qnxr_set_bp | ( | libqnxr_t * | g, |
ut64 | address, | ||
const char * | conditions, | ||
enum Breakpoint | type | ||
) |
Definition at line 615 of file core.c.
References DSMSG_BRK_EXEC, DSrMsg_err, DStMsg_brk, EXTRACT_UNSIGNED_INTEGER, g, nto_send(), nto_send_init(), and SET_CHANNEL_DEBUG.
Referenced by qnxr_set_bp(), and qnxr_set_hwbp().
Definition at line 650 of file core.c.
References DSMSG_NOTIFY_BRK, DSMSG_NOTIFY_DLLLOAD, DSMSG_NOTIFY_DLLUNLOAD, DSMSG_NOTIFY_PIDLOAD, DSMSG_NOTIFY_PIDUNLOAD, DSMSG_NOTIFY_SIGEV, DSMSG_NOTIFY_STEP, DSMSG_NOTIFY_STOPPED, DSMSG_NOTIFY_TIDLOAD, DSMSG_NOTIFY_TIDUNLOAD, eprintf, EXTRACT_SIGNED_INTEGER, EXTRACT_UNSIGNED_INTEGER, g, host_signal_from_nto(), pid, ptid_build(), RZ_DEBUG_REASON_BREAKPOINT, RZ_DEBUG_REASON_DEAD, RZ_DEBUG_REASON_SIGNAL, RZ_DEBUG_REASON_STEP, RZ_DEBUG_REASON_SWI, and RZ_DEBUG_REASON_UNKNOWN.
Referenced by qnxr_run(), and qnxr_wait().
Definition at line 748 of file core.c.
References DSHDR_MSG_BIG_ENDIAN, DSrMsg_err, eprintf, errnoconvert(), EXTRACT_SIGNED_INTEGER, g, len, MAX_TRAN_TRIES, PDEBUG_ECONINV, PDEBUG_ENOERR, PDEBUG_ENOPTY, PDEBUG_EPROCFS, PDEBUG_EPROCSTOP, PDEBUG_EQDBG, PDEBUG_EQMEMMODEL, PDEBUG_EQPROXY, PDEBUG_EQPSINFO, PDEBUG_ESPAWN, PDEBUG_ETHREAD, qnxr_read_packet(), qnxr_send_packet(), SET_CHANNEL_DEBUG, SET_CHANNEL_RESET, and SET_CHANNEL_TEXT.
Definition at line 732 of file core.c.
References DS_DATA_MAX_SIZE, DSMSG_ENV_ADDARG, DStMsg_env, eprintf, g, len, memcpy(), nto_send(), nto_send_init(), offsetof, and SET_CHANNEL_DEBUG.
Referenced by qnxr_run().
Definition at line 699 of file core.c.
References DS_DATA_MAX_SIZE, DSMSG_ENV_SETENV, DSMSG_ENV_SETENV_MORE, DStMsg_env, env, eprintf, g, len, memcpy(), nto_send(), nto_send_init(), offsetof, and SET_CHANNEL_DEBUG.
Referenced by qnxr_run().
Definition at line 643 of file core.c.
References cmd, g, and SET_CHANNEL_DEBUG.
Referenced by _qnxr_remove_bp(), _qnxr_set_bp(), nto_send_arg(), nto_send_env(), qnxr_attach(), qnxr_connect(), qnxr_disconnect(), qnxr_pidlist(), qnxr_read_memory(), qnxr_read_registers(), qnxr_run(), qnxr_select(), qnxr_send_vcont(), qnxr_stop(), qnxr_write_memory(), and qnxr_write_register().
Definition at line 223 of file core.c.
References DSrMsg_okdata, DStMsg_attach, eprintf, EXTRACT_SIGNED_INTEGER, g, nto_send(), nto_send_init(), null_ptid, pid, ptid_build(), qnxr_connect(), qnxr_disconnect(), rz_sys_sleep(), and SET_CHANNEL_DEBUG.
Referenced by rz_debug_qnx_attach().
Definition at line 147 of file core.c.
References DSMSG_PROTOVER_MAJOR, DSMSG_PROTOVER_MINOR, DSrMsg_err, DSrMsg_okstatus, DStMsg_connect, DStMsg_protover, EINVAL, eprintf, EXTRACT_SIGNED_INTEGER, g, HOST_QNX_PROTOVER_MAJOR, HOST_QNX_PROTOVER_MINOR, nto_send(), nto_send_init(), qnxr_send_ch_reset(), rz_socket_connect_tcp, rz_socket_new(), SET_CHANNEL_DEBUG, snprintf, and autogen_x86imm::tmp.
Referenced by __open(), and qnxr_attach().
Definition at line 470 of file core.c.
References g, and qnxr_send_vcont().
Referenced by rz_debug_qnx_continue().
Definition at line 206 of file core.c.
References DStMsg_disconnect, g, nto_send(), nto_send_init(), null_ptid, rz_socket_close(), and SET_CHANNEL_DEBUG.
Referenced by qnxr_attach(), and rz_debug_qnx_detach().
Definition at line 104 of file core.c.
References calloc(), DS_DATA_MAX_SIZE, g, memset(), RZ_FREE, and x86_32.
Referenced by __open().
void qnxr_pidlist | ( | libqnxr_t * | g, |
void * | ctx, | ||
pidlist_cb_t * | cb | ||
) |
Definition at line 417 of file core.c.
References cb, DSMSG_PIDLIST_BEGIN, DSMSG_PIDLIST_NEXT, DSrMsg_err, DSrMsg_okdata, DStMsg_pidlist, EXTRACT_SIGNED_INTEGER, g, if(), dspidlist::name, nto_send(), nto_send_init(), NULL, pid, dspidlist::pid, and SET_CHANNEL_DEBUG.
Referenced by rz_debug_qnx_pids().
Definition at line 365 of file core.c.
References addr, DS_DATA_MAX_SIZE, DSrMsg_okdata, DStMsg_memrd, EXTRACT_SIGNED_INTEGER, EXTRACT_UNSIGNED_INTEGER, g, len, memcpy(), nto_send(), nto_send_init(), SET_CHANNEL_DEBUG, and ut64().
Referenced by debug_qnx_read_at().
Definition at line 323 of file core.c.
References DS_DATA_MAX_SIZE, DSrMsg_okdata, DStMsg_regrd, eprintf, EXTRACT_SIGNED_INTEGER, g, i, i386nto_register_area(), i386nto_regset_id(), len, memcpy(), memset(), n, nto_send(), nto_send_init(), off, and SET_CHANNEL_DEBUG.
Referenced by rz_debug_qnx_reg_read().
Definition at line 607 of file core.c.
References _qnxr_remove_bp(), BREAKPOINT, and g.
Referenced by rz_debug_qnx_breakpoint().
Definition at line 611 of file core.c.
References _qnxr_remove_bp(), g, and HARDWARE_BREAKPOINT.
Referenced by rz_debug_qnx_breakpoint().
Definition at line 248 of file core.c.
References args, argv, DSMSG_ENV_CLEARARGV, DSMSG_ENV_CLEARENV, DSMSG_LOAD_DEBUG, DSrMsg_okdata, DStMsg_env, DStMsg_load, env, eprintf, g, nto_parse_notify(), nto_send(), nto_send_arg(), nto_send_env(), nto_send_init(), NULL, null_ptid, offsetof, p, ptid_t::pid, and SET_CHANNEL_DEBUG.
Definition at line 445 of file core.c.
References DSMSG_SELECT_SET, DSrMsg_err, DStMsg_select, eprintf, EXTRACT_SIGNED_INTEGER, g, nto_send(), nto_send_init(), pid, and SET_CHANNEL_DEBUG.
Referenced by rz_debug_qnx_select().
Definition at line 517 of file core.c.
References DSMSG_RUN, DSMSG_RUN_COUNT, DStMsg_run, g, nto_send(), nto_send_init(), SET_CHANNEL_DEBUG, and step().
Referenced by qnxr_continue(), and qnxr_step().
Definition at line 121 of file core.c.
References ARCH_ARM_32, ARCH_X86_32, arm32, eprintf, g, and x86_32.
Referenced by rz_debug_qnx_attach().
Definition at line 599 of file core.c.
References _qnxr_set_bp(), BREAKPOINT, conditions, and g.
Referenced by rz_debug_qnx_breakpoint().
Definition at line 603 of file core.c.
References _qnxr_set_bp(), conditions, g, and HARDWARE_BREAKPOINT.
Referenced by rz_debug_qnx_breakpoint().
Definition at line 466 of file core.c.
References g, and qnxr_send_vcont().
Referenced by rz_debug_qnx_step().
Definition at line 528 of file core.c.
References DSMSG_STOP_PIDS, DStMsg_stop, eprintf, g, nto_send_init(), qnxr_send_packet(), and SET_CHANNEL_DEBUG.
Referenced by rz_debug_qnx_stop().
Definition at line 542 of file core.c.
References DSHDR_MSG_BIG_ENDIAN, DShMsg_notify, DSrMsg_ok, eprintf, g, nto_parse_notify(), null_ptid, pid, qnxr_read_packet(), qnxr_send_ch_debug(), qnxr_send_packet(), SET_CHANNEL_DEBUG, and SET_CHANNEL_TEXT.
Referenced by rz_debug_qnx_wait().
Definition at line 395 of file core.c.
References addr, DSrMsg_ok, DSrMsg_okstatus, DStMsg_memwr, EXTRACT_SIGNED_INTEGER, EXTRACT_UNSIGNED_INTEGER, g, len, memcpy(), nto_send(), nto_send_init(), offsetof, SET_CHANNEL_DEBUG, and ut64().
Referenced by debug_qnx_write_at().
Definition at line 496 of file core.c.
References eprintf, g, i, len, qnxr_write_register(), and value.
Referenced by rz_debug_qnx_reg_write().
Definition at line 474 of file core.c.
References DStMsg_regwr, eprintf, EXTRACT_SIGNED_INTEGER, g, i386nto_register_area(), i386nto_regset_id(), len, memcpy(), nto_send(), nto_send_init(), off, offsetof, SET_CHANNEL_DEBUG, and value.
Referenced by qnxr_write_reg().
|
static |
Definition at line 74 of file core.c.
Referenced by qnxr_set_architecture().
ptid_t null_ptid = { 0, 0 } |
Definition at line 18 of file core.c.
Referenced by qnxr_attach(), qnxr_disconnect(), qnxr_run(), qnxr_wait(), and rz_debug_qnx_wait().
|
static |
Definition at line 27 of file core.c.
Referenced by qnxr_init(), and qnxr_set_architecture().