Rizin
unix-like reverse engineering framework and cli tools
|
#include "gdbclient/xml.h"
#include "gdbclient/commands.h"
#include "gdbclient/core.h"
#include "arch.h"
#include "gdbr_common.h"
#include "packet.h"
#include <rz_util.h>
#include <rz_debug.h>
Go to the source code of this file.
Classes | |
struct | gdbr_xml_flags_t |
struct | gdbr_xml_reg_t |
Macros | |
#define | MAX_PID_CHARS (5) |
Functions | |
static char * | gdbr_read_feature (libgdbr_t *g, const char *file, ut64 *tot_len) |
static char * | gdbr_read_osdata (libgdbr_t *g, const char *file, ut64 *tot_len) |
static void | _write_flag_bits (char *buf, const gdbr_xml_flags_t *flags) |
static int | _resolve_arch (libgdbr_t *g, char *xml_data) |
static RzList * | _extract_flags (char *flagstr) |
static RzList * | _extract_regs (char *regstr, RzList *flags, char *pc_alias) |
static RzDebugPid * | _extract_pid_info (const char *info, const char *path, int tid) |
static int | gdbr_parse_target_xml (libgdbr_t *g, char *xml_data, ut64 len) |
static int | gdbr_parse_processes_xml (libgdbr_t *g, char *xml_data, ut64 len, int pid, RzList *list) |
int | gdbr_read_target_xml (libgdbr_t *g) |
int | gdbr_read_processes_xml (libgdbr_t *g, int pid, RzList *list) |
|
static |
Definition at line 572 of file xml.c.
References gdbr_xml_flags_t::bit_num, calloc(), gdbr_xml_flags_t::fields, flags, free(), isdigit, gdbr_xml_flags_t::name, NULL, gdbr_xml_flags_t::num_bits, gdbr_xml_flags_t::num_fields, rz_list_free(), rz_list_new(), rz_list_push(), gdbr_xml_flags_t::sz, gdbr_xml_flags_t::type, and ut64().
Referenced by gdbr_parse_target_xml().
|
static |
Definition at line 679 of file xml.c.
References rz_debug_pid_t::gid, info(), NULL, rz_debug_pid_t::path, path, rz_debug_pid_t::pc, rz_debug_pid_t::pid, rz_debug_pid_t::ppid, rz_debug_pid_t::runnable, RZ_DBG_PROC_DEAD, RZ_DBG_PROC_RUN, RZ_DBG_PROC_SLEEP, RZ_DBG_PROC_STOP, RZ_DBG_PROC_ZOMBIE, RZ_NEW0, rz_debug_pid_t::status, strdup(), and rz_debug_pid_t::uid.
Referenced by gdbr_parse_processes_xml().
Definition at line 727 of file xml.c.
References calloc(), eprintf, gdbr_xml_reg_t::flagnum, flags, free(), i, isdigit, gdbr_xml_reg_t::name, NULL, gdbr_xml_flags_t::num_bits, regname(), regs, rz_list_free(), rz_list_length(), rz_list_new(), rz_list_push(), rz_list_set_n(), rz_str_startswith(), gdbr_xml_reg_t::size, gdbr_xml_flags_t::type, gdbr_xml_reg_t::type, and UINT32_MAX.
Referenced by gdbr_parse_target_xml().
Definition at line 523 of file xml.c.
References arch, eprintf, g, rz_str_startswith(), RZ_SYS_ARCH_ARM, RZ_SYS_ARCH_MIPS, RZ_SYS_ARCH_NONE, RZ_SYS_ARCH_RISCV, and RZ_SYS_ARCH_X86.
Referenced by gdbr_parse_target_xml().
|
static |
|
static |
Definition at line 362 of file xml.c.
References _extract_pid_info(), test_evm::end, eprintf, free(), g, gdbr_close_file(), gdbr_open_file(), gdbr_read_file(), rz_debug_pid_t::gid, list(), MAX_PID_CHARS, memcpy(), NULL, O_RDONLY, rz_debug_pid_t::path, rz_debug_pid_t::pid, pid, rz_debug_pid_t::ppid, rz_debug_pid_t::runnable, RZ_DBG_PROC_STOP, rz_list_append(), RZ_NEW0, rz_str_newf(), rz_str_startswith(), rz_debug_pid_t::status, status, strdup(), and rz_debug_pid_t::uid.
Referenced by gdbr_read_processes_xml().
Definition at line 175 of file xml.c.
References _extract_flags(), _extract_regs(), _resolve_arch(), _write_flag_bits(), gdbr_xml_flags_t::bit_num, gdbr_xml_flags_t::fields, gdbr_xml_reg_t::flagnum, flags, free(), g, i, malloc(), memcpy(), gdbr_xml_flags_t::name, gdbr_xml_reg_t::name, NULL, gdbr_xml_flags_t::num_fields, gdb_reg::offset, PFMT64d, realloc(), regs, RZ_FREE, rz_list_free(), rz_list_get_n(), rz_list_length(), rz_str_prepend(), RZ_SYS_ARCH_ARM, RZ_SYS_ARCH_MIPS, RZ_SYS_ARCH_X86, gdb_reg::size, gdbr_xml_reg_t::size, snprintf, strdup(), gdbr_xml_flags_t::sz, autogen_x86imm::tmp, gdbr_xml_reg_t::type, and ut64().
Referenced by gdbr_read_target_xml().
Definition at line 15 of file xml.c.
References free(), g, len, memcpy(), msg, NULL, off, PFMT64x, read_packet(), realloc(), send_ack(), send_msg(), snprintf, status, autogen_x86imm::tmp, and ut64().
Referenced by gdbr_read_target_xml().
Definition at line 109 of file xml.c.
References free(), g, len, msg, NULL, off, PFMT64x, read_packet(), realloc(), send_ack(), send_msg(), snprintf, status, autogen_x86imm::tmp, and ut64().
Referenced by gdbr_read_processes_xml().
Definition at line 474 of file xml.c.
References test_evm::end, free(), g, gdbr_parse_processes_xml(), gdbr_read_osdata(), len, list(), pid, and ut64().
Referenced by gdbr_pids_list().
Definition at line 460 of file xml.c.
References free(), g, gdbr_parse_target_xml(), gdbr_read_feature(), len, and ut64().
Referenced by gdbr_connect(), and gdbr_connect_lldb().