Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_io.h>
#include <rz_lib.h>
#include <rz_socket.h>
#include <rz_util.h>
#include <ctype.h>
#include <libgdbr.h>
#include <gdbclient/commands.h>
#include <gdbclient/responses.h>
Go to the source code of this file.
Classes | |
struct | RzIOGdb |
Macros | |
#define | IRAPI static inline |
#define | RZ_GDB_MAGIC rz_str_djb2_hash("gdb") |
Functions | |
static int | __close (RzIODesc *fd) |
static bool | __plugin_open (RzIO *io, const char *file, bool many) |
static int | debug_gdb_read_at (ut8 *buf, int sz, ut64 addr) |
static int | debug_gdb_write_at (const ut8 *buf, int sz, ut64 addr) |
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 ut64 | __lseek (RzIO *io, RzIODesc *fd, ut64 offset, int whence) |
static int | __read (RzIO *io, RzIODesc *fd, ut8 *buf, int count) |
static int | __getpid (RzIODesc *fd) |
static int | __gettid (RzIODesc *fd) |
int | send_msg (libgdbr_t *g, const char *command) |
int | read_packet (libgdbr_t *instance, bool vcont) |
static char * | __system (RzIO *io, RzIODesc *fd, const char *cmd) |
Variables | |
static libgdbr_t * | desc = NULL |
RzIOPlugin | rz_io_plugin_gdb |
RZ_API RzLibStruct | rizin_plugin |
#define RZ_GDB_MAGIC rz_str_djb2_hash("gdb") |
Definition at line 167 of file io_gdb.c.
References desc, fd, gdbr_cleanup(), gdbr_disconnect(), z80_opcode::name, and RZ_FREE.
Referenced by __open().
Definition at line 177 of file io_gdb.c.
References libgdbr_t::data, desc, RzIODescData::magic, RzIODescData::pid, libgdbr_t::pid, and RZ_GDB_MAGIC.
Definition at line 196 of file io_gdb.c.
References desc, and libgdbr_t::tid.
Definition at line 141 of file io_gdb.c.
References rz_io_t::off, RZ_IO_SEEK_CUR, RZ_IO_SEEK_END, RZ_IO_SEEK_SET, and ST64_MAX.
Definition at line 54 of file io_gdb.c.
References __close(), __plugin_open(), RzIOGdb::desc, desc, eprintf, free(), gdbr_attach(), gdbr_connect(), gdbr_exec_file_read(), gdbr_init(), rz_io_desc_t::name, NULL, pid, libgdbr_t::pid, rz_io_desc_new(), rz_io_plugin_gdb, RZ_NEW0, and RZ_PERM_RWX.
Definition at line 155 of file io_gdb.c.
References addr, count, libgdbr_t::data, debug_gdb_read_at(), desc, fd, memset(), rz_io_t::off, and ut64().
Definition at line 203 of file io_gdb.c.
References rz_io_t::cb_printf, cmd, libgdbr_t::data, libgdbr_t::data_len, desc, eprintf, file, gdbr_detach(), gdbr_detach_pid(), gdbr_exec_file_read(), gdbr_invalidate_reg_cache(), gdbr_lock_enter(), gdbr_lock_leave(), gdbr_send_qRcmd(), libgdbr_t::get_baddr, handle_stop_reason(), libgdbr_stop_reason::is_valid, isdigit, isspace, libgdbr_stub_features_t::multiprocess, libgdbr_t::no_ack, NULL, libgdbr_t::num_retries, libgdbr_t::page_size, pid, libgdbr_t::pid, pj_end(), pj_free(), pj_kb(), pj_new(), pj_o(), pj_string(), libgdbr_stub_features_t::pkt_sz, read_packet(), libgdbr_stop_reason::reason, libgdbr_stub_features_t::ReverseContinue, libgdbr_stub_features_t::ReverseStep, RZ_MAX, rz_str_newf(), rz_str_startswith(), rz_str_trim_head_ro(), send_msg(), libgdbr_t::stop_reason, libgdbr_t::stub_features, libgdbr_stop_reason::thread, and libgdbr_stop_reason::tid.
Definition at line 133 of file io_gdb.c.
References addr, count, libgdbr_t::data, debug_gdb_write_at(), desc, rz_io_t::off, and ut64().
Definition at line 27 of file io_gdb.c.
References addr, desc, gdbr_read_memory(), and UT64_MAX.
Referenced by __read().
Definition at line 34 of file io_gdb.c.
References addr, desc, gdbr_write_memory(), libgdbr_t::read_max, ut64(), UT64_MAX, and x.
Referenced by __write().
Definition at line 143 of file packet.c.
References eprintf, g, i, READ_TIMEOUT, rz_socket_read(), rz_socket_ready(), and unpack().
Referenced by __system(), gdbr_attach(), gdbr_check_extended_mode(), gdbr_check_vcont(), gdbr_close_file(), gdbr_connect(), gdbr_connect_lldb(), gdbr_detach_pid(), gdbr_exec_file_read(), gdbr_get_baddr(), gdbr_is_thread_dead(), gdbr_kill_pid(), gdbr_open_file(), gdbr_pids_list(), gdbr_read_feature(), gdbr_read_file(), gdbr_read_memory_page(), gdbr_read_osdata(), gdbr_read_registers(), gdbr_read_registers_lldb(), gdbr_select(), gdbr_send_qRcmd(), gdbr_server_serve(), gdbr_stop_reason(), gdbr_threads_list(), gdbr_write_bin_registers(), gdbr_write_memory(), gdbr_write_register(), gdbr_write_registers(), remove_bp(), send_vcont(), set_bp(), and test_command().
Definition at line 146 of file common.c.
References g, msg, pack(), and send_packet().
Referenced by __system(), _server_handle_c(), _server_handle_exec_file_read(), _server_handle_g(), _server_handle_Hc(), _server_handle_Hg(), _server_handle_M(), _server_handle_m(), _server_handle_p(), _server_handle_P(), _server_handle_qAttached(), _server_handle_qC(), _server_handle_qfThreadInfo(), _server_handle_qOffsets(), _server_handle_qsThreadInfo(), _server_handle_qSupported(), _server_handle_qTfV(), _server_handle_qTStatus(), _server_handle_ques(), _server_handle_s(), _server_handle_vCont(), _server_handle_vKill(), _server_handle_vMustReplyEmpty(), _server_handle_z(), gdbr_attach(), gdbr_check_extended_mode(), gdbr_check_vcont(), gdbr_close_file(), gdbr_connect(), gdbr_connect_lldb(), gdbr_detach(), gdbr_detach_pid(), gdbr_exec_file_read(), gdbr_get_baddr(), gdbr_is_thread_dead(), gdbr_kill(), gdbr_kill_pid(), gdbr_open_file(), gdbr_pids_list(), gdbr_read_feature(), gdbr_read_file(), gdbr_read_memory_page(), gdbr_read_osdata(), gdbr_read_registers(), gdbr_read_registers_lldb(), gdbr_select(), gdbr_send_qRcmd(), gdbr_server_serve(), gdbr_stop_reason(), gdbr_threads_list(), gdbr_write_bin_registers(), gdbr_write_memory(), gdbr_write_register(), gdbr_write_registers(), remove_bp(), send_vcont(), set_bp(), and test_command().
Definition at line 21 of file io_gdb.c.
Referenced by __close(), __getpid(), __gettid(), __open(), __read(), __system(), __write(), debug_gdb_read_at(), and debug_gdb_write_at().
RZ_API RzLibStruct rizin_plugin |
RzIOPlugin rz_io_plugin_gdb |
Definition at line 410 of file io_gdb.c.
Referenced by __open().