Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_io.h>
#include <rz_lib.h>
#include <rz_util.h>
#include <rz_util/rz_print.h>
#include "io_gprobe.h"
#include <stropts.h>
Go to the source code of this file.
Classes | |
struct | gport |
struct | RzIOGprobe |
Macros | |
#define | USE_OWNTIMER 1 |
#define | GPROBE_SIZE (1LL << 32) |
#define | GPROBE_I2C_ADDR 0x6e |
#define | I2C_SLAVE 0x0703 |
Enumerations | |
enum | { GPROBE_DEBUGON = 0x09 , GPROBE_DEBUGOFF = 0x0a , GPROBE_ACK = 0x0c , GPROBE_RESET = 0x20 , GPROBE_GET_DEVICE_ID = 0x30 , GPROBE_GET_INFORMATION = 0x40 , GPROBE_RAM_READ_2 = 0x52 , GPROBE_RAM_WRITE_2 = 0x53 , GPROBE_RUN_CODE_2 = 0x54 } |
Variables | |
RzIOPlugin | rz_io_plugin_gprobe |
RZ_API RzLibStruct | rizin_plugin |
#define GPROBE_I2C_ADDR 0x6e |
Definition at line 40 of file io_gprobe.c.
#define GPROBE_SIZE (1LL << 32) |
Definition at line 39 of file io_gprobe.c.
#define I2C_SLAVE 0x0703 |
Definition at line 42 of file io_gprobe.c.
#define USE_OWNTIMER 1 |
Definition at line 16 of file io_gprobe.c.
anonymous enum |
Enumerator | |
---|---|
GPROBE_DEBUGON | |
GPROBE_DEBUGOFF | |
GPROBE_ACK | |
GPROBE_RESET | |
GPROBE_GET_DEVICE_ID | |
GPROBE_GET_INFORMATION | |
GPROBE_RAM_READ_2 | |
GPROBE_RAM_WRITE_2 | |
GPROBE_RUN_CODE_2 |
Definition at line 73 of file io_gprobe.c.
Definition at line 1078 of file io_gprobe.c.
References fd, RzIOGprobe::gport, RZ_FREE, and sp_close().
Definition at line 1092 of file io_gprobe.c.
References fd, GPROBE_SIZE, RzIOGprobe::offset, SEEK_CUR, SEEK_END, and SEEK_SET.
Definition at line 1119 of file io_gprobe.c.
References __plugin_open(), gport::frame, gport::get_reply, RzIOGprobe::gport, gprobe_frame_sp(), gprobe_get_reply_sp(), gprobe_send_request_sp(), gport::max_rx_size, gport::max_tx_size, gport::name, NULL, RzIOGprobe::offset, pathname, RZ_FREE, rz_io_desc_new(), rz_io_plugin_gprobe, RZ_NEW0, rz_str_startswith(), gport::send_request, and sp_open().
Definition at line 1115 of file io_gprobe.c.
References pathname, and rz_str_startswith().
Referenced by __open().
Definition at line 1051 of file io_gprobe.c.
References count, fd, RzIOGprobe::gport, gprobe_read(), GPROBE_SIZE, if(), and RzIOGprobe::offset.
Definition at line 1161 of file io_gprobe.c.
References cmd, fd, RzIOGprobe::gport, gprobe_debugoff(), gprobe_debugon(), gprobe_getdeviceid(), gprobe_getinformation(), gprobe_reset(), gprobe_runcode(), if(), NULL, printf(), and rz_str_startswith().
Definition at line 1024 of file io_gprobe.c.
References count, fd, RzIOGprobe::gport, GPROBE_SIZE, gprobe_write(), if(), and RzIOGprobe::offset.
Definition at line 641 of file io_gprobe.c.
Referenced by gprobe_frame_sp(), and gprobe_get_reply_sp().
Definition at line 873 of file io_gprobe.c.
References cmd, fail, gport::frame, gport::get_reply, GPROBE_ACK, GPROBE_DEBUGOFF, NULL, request, rz_buf_append_bytes(), rz_buf_free(), rz_buf_new_with_bytes(), and gport::send_request.
Referenced by __system().
Definition at line 839 of file io_gprobe.c.
References cmd, fail, gport::frame, gport::get_reply, GPROBE_ACK, GPROBE_DEBUGON, NULL, request, rz_buf_append_bytes(), rz_buf_free(), rz_buf_new_with_bytes(), and gport::send_request.
Referenced by __system().
|
static |
Definition at line 654 of file io_gprobe.c.
References gprobe_checksum(), rz_buf_append_bytes(), rz_buf_data(), rz_buf_prepend_bytes(), autogen_x86imm::tmp, and ut64().
Referenced by __open().
Definition at line 666 of file io_gprobe.c.
References cmd, count, gprobe_checksum(), printf(), rz_buf_append_bytes(), and sp_blocking_read().
Referenced by __open().
Definition at line 937 of file io_gprobe.c.
References cmd, fail, gport::frame, free(), gport::get_reply, GPROBE_GET_DEVICE_ID, NULL, printf(), request, rz_buf_append_bytes(), rz_buf_free(), rz_buf_new_with_bytes(), rz_buf_to_string(), s, and gport::send_request.
Referenced by __system().
Definition at line 979 of file io_gprobe.c.
References cmd, fail, gport::frame, free(), gport::get_reply, GPROBE_GET_INFORMATION, NULL, request, rz_buf_append_bytes(), rz_buf_data(), rz_buf_free(), rz_buf_new_with_bytes(), rz_print_free(), rz_print_hexdump_str(), rz_print_new(), gport::send_request, autogen_x86imm::tmp, and ut64().
Referenced by __system().
Definition at line 712 of file io_gprobe.c.
References addr, cmd, count, fail, gport::frame, gport::get_reply, GPROBE_RAM_READ_2, gport::max_rx_size, NULL, request, rz_buf_append_bytes(), rz_buf_free(), rz_buf_new_with_bytes(), rz_buf_read_at(), rz_buf_size(), RZ_MIN, rz_write_be32(), and gport::send_request.
Referenced by __read().
Definition at line 801 of file io_gprobe.c.
References cmd, fail, gport::frame, gport::get_reply, GPROBE_ACK, GPROBE_RESET, NULL, request, rz_buf_append_bytes(), rz_buf_free(), rz_buf_new_with_bytes(), gport::send_request, and sp_flush().
Referenced by __system().
Definition at line 898 of file io_gprobe.c.
References addr, cmd, fail, gport::frame, gport::get_reply, GPROBE_ACK, GPROBE_RUN_CODE_2, NULL, request, rz_buf_append_bytes(), rz_buf_free(), rz_buf_new_with_bytes(), rz_write_be32(), and gport::send_request.
Referenced by __system().
Definition at line 700 of file io_gprobe.c.
References request, rz_buf_data(), sp_blocking_write(), sp_flush(), autogen_x86imm::tmp, and ut64().
Referenced by __open().
Definition at line 758 of file io_gprobe.c.
References addr, cmd, count, fail, gport::frame, gport::get_reply, GPROBE_ACK, GPROBE_RAM_WRITE_2, gport::max_tx_size, NULL, request, rz_buf_append_bytes(), rz_buf_free(), rz_buf_new_with_bytes(), RZ_MIN, rz_write_be32(), and gport::send_request.
Referenced by __write().
|
static |
Definition at line 398 of file io_gprobe.c.
References count, delta, DWORD, EAGAIN, EINTR, test_evm::end, gport::fd, FD_SET, FD_ZERO, gettimeofday, NULL, read(), select, start, Timeradd, Timercmp, Timersub, and TRUE.
Referenced by gprobe_get_reply_sp().
|
static |
Definition at line 503 of file io_gprobe.c.
References gport::fd, and TCIFLUSH.
Referenced by gprobe_reset(), and gprobe_send_request_sp().
Definition at line 237 of file io_gprobe.c.
References B115200, CLOCAL, CREAD, CRTSCTS, CS8, CSIZE, CSTOPB, DWORD, FALSE, gport::fd, free(), IGNBRK, INVALID_HANDLE_VALUE, IXANY, IXOFF, IXON, malloc(), gport::name, O_NOCTTY, O_NONBLOCK, O_RDWR, PARENB, PARODD, rz_sys_open(), sp_close(), sprintf, status, TCSANOW, TRUE, tty, VMIN, and VTIME.
Referenced by __open().
RZ_API RzLibStruct rizin_plugin |
Definition at line 1243 of file io_gprobe.c.
RzIOPlugin rz_io_plugin_gprobe |
Definition at line 1228 of file io_gprobe.c.
Referenced by __open().