Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_analysis.h>
Go to the source code of this file.
Macros | |
#define | MINLEN 1 |
#define | USE_IS_VALID_OFFSET 1 |
Functions | |
static int | is_string (const ut8 *buf, int size, int *len) |
static int | is_number (const ut8 *buf, int size) |
static int | is_null (const ut8 *buf, int size) |
static int | is_invalid (const ut8 *buf, int size) |
static ut64 | is_pointer (RzAnalysis *analysis, const ut8 *buf, int size) |
static bool | is_bin (const ut8 *buf, int size) |
RZ_API char * | rz_analysis_data_to_string (RzAnalysisData *d, RzConsPrintablePalette *pal) |
RZ_API RzAnalysisData * | rz_analysis_data_new_string (ut64 addr, const char *p, int len, int type) |
RZ_API RzAnalysisData * | rz_analysis_data_new (ut64 addr, int type, ut64 n, const ut8 *buf, int len) |
RZ_API void | rz_analysis_data_free (RzAnalysisData *d) |
RZ_API RzAnalysisData * | rz_analysis_data (RzAnalysis *analysis, ut64 addr, const ut8 *buf, int size, int wordsize) |
RZ_API const char * | rz_analysis_data_kind (RzAnalysis *a, ut64 addr, const ut8 *buf, int len) |
RZ_API const char * | rz_analysis_datatype_to_string (RzAnalysisDataType t) |
Definition at line 37 of file data.c.
References int, n, rz_mem_get_num(), UT32_MAX, and ut64().
Referenced by rz_analysis_data(), and tokenize_asm_generic().
|
static |
Definition at line 58 of file data.c.
References buf2, rz_io_bind_t::io, rz_analysis_t::iob, is_invalid(), rz_io_bind_t::is_valid_offset, n, r, rz_io_bind_t::read_at, rz_mem_get_num(), and ut64().
Referenced by rz_analysis_data().
Definition at line 7 of file data.c.
References i, IS_PRINTABLE, len, and MINLEN.
Referenced by hash_context_create_desc_io_string(), and rz_analysis_data().
RZ_API RzAnalysisData* rz_analysis_data | ( | RzAnalysis * | analysis, |
ut64 | addr, | ||
const ut8 * | buf, | ||
int | size, | ||
int | wordsize | ||
) |
Definition at line 283 of file data.c.
References addr, rz_analysis_t::bits, bits(), dst, i, is_bin(), is_invalid(), is_null(), is_number(), is_pointer(), is_string(), len, n, NULL, rz_analysis_data_new(), rz_analysis_data_new_string(), RZ_ANALYSIS_DATA_TYPE_HEADER, RZ_ANALYSIS_DATA_TYPE_INVALID, RZ_ANALYSIS_DATA_TYPE_NULL, RZ_ANALYSIS_DATA_TYPE_NUMBER, RZ_ANALYSIS_DATA_TYPE_PATTERN, RZ_ANALYSIS_DATA_TYPE_POINTER, RZ_ANALYSIS_DATA_TYPE_SEQUENCE, RZ_ANALYSIS_DATA_TYPE_STRING, RZ_ANALYSIS_DATA_TYPE_UNKNOWN, RZ_ANALYSIS_DATA_TYPE_WIDE_STRING, RZ_MIN, and ut64().
Referenced by rz_analysis_data_kind(), and rz_core_analysis_data().
RZ_API void rz_analysis_data_free | ( | RzAnalysisData * | d | ) |
Definition at line 273 of file data.c.
Referenced by rz_analysis_data_kind(), rz_analysis_data_new(), rz_analysis_data_new_string(), and rz_core_analysis_data().
Definition at line 346 of file data.c.
References a, addr, i, len, num, rz_analysis_data(), rz_analysis_data_free(), RZ_ANALYSIS_DATA_TYPE_INVALID, RZ_ANALYSIS_DATA_TYPE_NUMBER, RZ_ANALYSIS_DATA_TYPE_STRING, RZ_ANALYSIS_DATA_TYPE_UNKNOWN, and cmd_descs_generate::str.
Referenced by ds_print_ptr(), and rz_cmd_analysis().
RZ_API RzAnalysisData* rz_analysis_data_new | ( | ut64 | addr, |
int | type, | ||
ut64 | n, | ||
const ut8 * | buf, | ||
int | len | ||
) |
Definition at line 243 of file data.c.
References addr, len, memcpy(), memset(), n, NULL, rz_analysis_data_free(), RZ_ANALYSIS_DATA_TYPE_PATTERN, RZ_ANALYSIS_DATA_TYPE_SEQUENCE, RZ_MIN, RZ_NEW0, and type.
Referenced by rz_analysis_data().
Definition at line 208 of file data.c.
References addr, L, len, malloc(), memcpy(), NULL, p, rz_analysis_data_free(), RZ_ANALYSIS_DATA_TYPE_WIDE_STRING, RZ_LOG_ERROR, RZ_NEW0, and type.
Referenced by rz_analysis_data().
RZ_API char* rz_analysis_data_to_string | ( | RzAnalysisData * | d, |
RzConsPrintablePalette * | pal | ||
) |
Definition at line 104 of file data.c.
References rz_cons_printable_palette_t::b0x00, Color_RESET, rz_cons_printable_palette_t::comment, d, i, rz_cons_printable_palette_t::invalid, k, len, NULL, rz_cons_printable_palette_t::num, rz_cons_printable_palette_t::offset, PFMT64d, PFMT64x, RZ_ANALYSIS_DATA_TYPE_HEADER, RZ_ANALYSIS_DATA_TYPE_INVALID, RZ_ANALYSIS_DATA_TYPE_NUMBER, RZ_ANALYSIS_DATA_TYPE_PATTERN, RZ_ANALYSIS_DATA_TYPE_POINTER, RZ_ANALYSIS_DATA_TYPE_SEQUENCE, RZ_ANALYSIS_DATA_TYPE_STRING, RZ_ANALYSIS_DATA_TYPE_UNKNOWN, RZ_ANALYSIS_DATA_TYPE_WIDE_STRING, RZ_LOG_ERROR, RZ_MIN, rz_strbuf_append(), rz_strbuf_appendf(), rz_strbuf_drain(), rz_strbuf_free(), rz_strbuf_new(), rz_strbuf_reserve(), and sb.
Referenced by rz_core_analysis_data().
RZ_API const char* rz_analysis_datatype_to_string | ( | RzAnalysisDataType | t | ) |
Definition at line 409 of file data.c.
References NULL, RZ_ANALYSIS_DATATYPE_ARRAY, RZ_ANALYSIS_DATATYPE_BOOLEAN, RZ_ANALYSIS_DATATYPE_CLASS, RZ_ANALYSIS_DATATYPE_FLOAT, RZ_ANALYSIS_DATATYPE_INT16, RZ_ANALYSIS_DATATYPE_INT32, RZ_ANALYSIS_DATATYPE_INT64, RZ_ANALYSIS_DATATYPE_NULL, RZ_ANALYSIS_DATATYPE_OBJECT, and RZ_ANALYSIS_DATATYPE_STRING.
Referenced by core_analysis_bytes_json(), and core_analysis_bytes_standard().