Rizin
unix-like reverse engineering framework and cli tools
|
#include <stdint.h>
#include "arch.h"
#include "rz_types_base.h"
#include "rz_socket.h"
#include "rz_th.h"
Go to the source code of this file.
Classes | |
struct | libgdbr_message_t |
struct | libgdbr_stub_features_t |
struct | libgdbr_stop_reason |
struct | libgdbr_t |
Macros | |
#define | MSG_OK 0 |
#define | MSG_NOT_SUPPORTED -1 |
#define | MSG_ERROR_1 -2 |
#define | GDB_REMOTE_TYPE_GDB 0 |
#define | GDB_REMOTE_TYPE_LLDB 1 |
#define | GDB_MAX_PKTSZ 4 |
Typedefs | |
typedef struct libgdbr_message_t | libgdbr_message_t |
typedef struct libgdbr_stub_features_t | libgdbr_stub_features_t |
typedef struct libgdbr_stop_reason | libgdbr_stop_reason_t |
typedef struct libgdbr_t | libgdbr_t |
Functions | |
RZ_PACKED (typedef struct libgdbr_fstat_t { unsigned dev;unsigned ino;unsigned mode;unsigned numlinks;unsigned uid;unsigned gid;unsigned rdev;uint64_t size;uint64_t blksize;uint64_t blocks;unsigned atime;unsigned mtime;unsigned ctime;}) libgdbr_fstat_t | |
int | gdbr_init (libgdbr_t *g, bool is_server) |
Function initializes the libgdbr lib. More... | |
bool | gdbr_set_architecture (libgdbr_t *g, int arch, int bits) |
Function initializes the architecture of the gdbsession. More... | |
char * | gdbr_get_reg_profile (int arch, int bits) |
Function get gdb registers profile based on arch and bits. More... | |
int | gdbr_set_reg_profile (libgdbr_t *g, const char *str) |
Function set the gdbr internal registers profile. More... | |
int | gdbr_cleanup (libgdbr_t *g) |
frees all buffers and cleans the libgdbr instance stuff More... | |
typedef struct libgdbr_message_t libgdbr_message_t |
Structure that saves a gdb message
typedef struct libgdbr_stop_reason libgdbr_stop_reason_t |
Stores information from the stop-reply packet (why target stopped)
typedef struct libgdbr_stub_features_t libgdbr_stub_features_t |
Structure that stores features supported
frees all buffers and cleans the libgdbr instance stuff
Definition at line 146 of file libgdbr.c.
References g, RZ_FREE, rz_socket_free(), and rz_th_lock_free().
Referenced by __close(), and rz_core_rtr_gdb_run().
Function get gdb registers profile based on arch and bits.
architecture | and bit size. |
Definition at line 76 of file libgdbr.c.
References arch, bits(), eprintf, NULL, RZ_SYS_ARCH_ARM, RZ_SYS_ARCH_AVR, RZ_SYS_ARCH_LM32, RZ_SYS_ARCH_MIPS, RZ_SYS_ARCH_RISCV, RZ_SYS_ARCH_SH, RZ_SYS_ARCH_V850, and RZ_SYS_ARCH_X86.
Referenced by gdbr_set_architecture(), and rz_debug_gdb_reg_profile().
Function initializes the libgdbr lib.
Definition at line 9 of file libgdbr.c.
References calloc(), g, GDB_REMOTE_TYPE_GDB, memset(), MSG_OK, RZ_FREE, rz_socket_new(), and rz_th_lock_new().
Referenced by __open(), and rz_core_rtr_gdb_run().
Function initializes the architecture of the gdbsession.
architecture | defines the architecure used (registersize, and such) |
Definition at line 52 of file libgdbr.c.
References arch, bits(), eprintf, free(), g, gdbr_get_reg_profile(), and gdbr_set_reg_profile().
Referenced by rz_core_rtr_gdb_run(), rz_debug_gdb_attach(), and rz_debug_gdb_reg_profile().
Function set the gdbr internal registers profile.
registers | profile string which shares the same format as RzReg API |
Definition at line 125 of file libgdbr.c.
References arch_parse_reg_profile(), eprintf, free(), g, cmd_descs_generate::str, and strdup().
Referenced by gdbr_set_architecture(), and rz_debug_gdb_set_reg_profile().