Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_core.h>
Go to the source code of this file.
Classes | |
struct | CollectCtx |
|
static |
Definition at line 313 of file cmeta.c.
References addr, collect_nodes_cb(), rz_analysis_t::meta, NULL, rz_interval_tree_all_at(), rz_pvector_new(), and type.
Referenced by rz_core_meta_print_list_at().
|
static |
Definition at line 305 of file cmeta.c.
References rz_interval_node_t::data, item_matches_filter(), and rz_pvector_push().
Referenced by collect_nodes_at().
|
static |
Definition at line 301 of file cmeta.c.
References RZ_META_TYPE_ANY, rz_analysis_meta_item_t::space, type, and rz_analysis_meta_item_t::type.
Referenced by collect_nodes_cb().
|
static |
RzCoreMetaString
Definition at line 409 of file cmeta.c.
References addr, rz_core_t::io, limit, malloc(), RZ_FREE, rz_io_read_at(), and rz_return_val_if_fail.
Referenced by rz_core_meta_string_add().
|
static |
Definition at line 46 of file cmeta.c.
References rz_print_t::esc_bslash, RzStrEscOptions::esc_bslash, mi, NULL, rz_core_t::print, rz_str_escape_8bit(), rz_str_escape_utf8(), RZ_STRING_ENC_8BIT, RZ_STRING_ENC_EBCDIC_ES, RZ_STRING_ENC_EBCDIC_UK, RZ_STRING_ENC_EBCDIC_US, RZ_STRING_ENC_IBM037, RZ_STRING_ENC_IBM290, RZ_STRING_ENC_UTF16BE, RZ_STRING_ENC_UTF16LE, RZ_STRING_ENC_UTF32BE, RZ_STRING_ENC_UTF32LE, RZ_STRING_ENC_UTF8, rz_warn_if_reached, and RzStrEscOptions::show_asciidot.
Referenced by rz_core_meta_print().
|
static |
Definition at line 424 of file cmeta.c.
References addr, rz_core_t::bin, rz_bin_file_t::buf, RzUtilStrScanOptions::buf_size, rz_core_t::config, count, cmd_descs_generate::encoding, free(), rz_core_t::io, limit, malloc(), name, rz_bin_file_t::rbin, rz_bin_cur(), rz_bin_cur_object(), rz_config_get_b(), rz_io_v2p(), rz_list_first(), rz_list_free(), rz_list_new(), rz_return_val_if_fail, rz_scan_strings(), rz_str_ncpy(), rz_bin_t::strseach_check_ascii_freq, and ut64().
Referenced by rz_core_meta_string_add().
|
static |
Definition at line 342 of file cmeta.c.
References addr, rz_core_t::analysis, rz_analysis_t::meta, NULL, rz_analysis_function_contains(), rz_analysis_get_fcn_in(), rz_core_meta_print(), rz_interval_tree_foreach, rz_interval_tree_iter_get(), RZ_META_TYPE_ANY, rz_interval_node_t::start, type, rz_analysis_meta_item_t::type, and UT64_MAX.
Referenced by rz_core_meta_print_list_all(), and rz_core_meta_print_list_in_function().
RZ_IPI void rz_core_meta_append | ( | RzCore * | core, |
const char * | newcomment, | ||
RzAnalysisMetaType | mtype, | ||
ut64 | addr | ||
) |
Definition at line 376 of file cmeta.c.
References addr, rz_core_t::analysis, free(), rz_meta_get_string(), rz_meta_set_string(), rz_str_newf(), rz_str_unescape(), rz_sys_perror, strdup(), and create_tags_rz::text.
Referenced by add_comment(), rz_comment_append_handler(), and rz_comment_handler().
RZ_IPI void rz_core_meta_editor | ( | RzCore * | core, |
RzAnalysisMetaType | mtype, | ||
ut64 | addr | ||
) |
Definition at line 394 of file cmeta.c.
References addr, rz_core_t::analysis, free(), NULL, out, rz_core_editor(), rz_meta_del(), rz_meta_get_string(), and rz_meta_set_string().
Referenced by add_comment(), rz_comment_editor_handler(), and rz_meta_type_editor_handler().
RZ_API bool rz_core_meta_pascal_string_add | ( | RzCore * | core, |
ut64 | addr, | ||
RzStrEnc | encoding, | ||
RZ_NULLABLE const char * | name | ||
) |
add a pascal string to RzCore
core | RzCore of core that will be add to |
addr | string's address |
size | string's max size |
encoding | string's encoding |
name | string's value, or null that will be autodetect at addr |
Definition at line 516 of file cmeta.c.
References addr, rz_core_t::bin, rz_bin_file_t::buf, cmd_descs_generate::encoding, rz_core_t::io, NULL, rz_core_t::offset, rz_bin_cur(), rz_buf_read8_at(), rz_core_meta_string_add(), rz_io_v2p(), rz_return_val_if_fail, RZ_STRING_ENC_8BIT, RZ_STRING_ENC_UTF8, and ut64().
Referenced by rz_meta_string_pascal_handler().
RZ_IPI void rz_core_meta_print | ( | RzCore * | core, |
RzAnalysisMetaItem * | d, | ||
ut64 | start, | ||
ut64 | size, | ||
bool | show_full, | ||
RzCmdStateOutput * | state | ||
) |
Definition at line 74 of file cmeta.c.
References A, rz_core_t::analysis, b, cmd, d, free(), g, rz_analysis_t::meta_spaces, meta_string_escape(), NULL, PFMT64u, PFMT64x, pj_end(), pj_k(), pj_kb(), pj_kn(), pj_ks(), pj_o(), pj_s(), r, rz_base64_encode_dyn(), rz_cons_printf(), rz_cons_rgb_parse(), rz_cons_rgb_tostring(), RZ_META_TYPE_COMMENT, RZ_META_TYPE_DATA, RZ_META_TYPE_FORMAT, RZ_META_TYPE_HIDE, RZ_META_TYPE_HIGHLIGHT, RZ_META_TYPE_MAGIC, RZ_META_TYPE_STRING, rz_meta_type_to_string(), RZ_META_TYPE_VARTYPE, rz_name_filter(), RZ_OUTPUT_MODE_JSON, RZ_OUTPUT_MODE_LONG, RZ_OUTPUT_MODE_RIZIN, RZ_OUTPUT_MODE_STANDARD, rz_spaces_current(), rz_str_enc_as_string(), rz_str_escape(), rz_str_get(), rz_str_is_ascii(), rz_str_sanitize(), RZ_STRING_ENC_8BIT, RZ_STRING_ENC_UTF16BE, RZ_STRING_ENC_UTF16LE, RZ_STRING_ENC_UTF32BE, RZ_STRING_ENC_UTF32LE, RZ_STRING_ENC_UTF8, s, sdb_encode(), start, cmd_descs_generate::str, strdup(), and type.
Referenced by print_meta_list(), rz_core_meta_print_list_at(), and rz_meta_string_at_handler().
RZ_IPI void rz_core_meta_print_list_all | ( | RzCore * | core, |
RzAnalysisMetaType | type, | ||
RzCmdStateOutput * | state | ||
) |
Definition at line 364 of file cmeta.c.
References print_meta_list(), rz_cmd_state_output_array_end(), rz_cmd_state_output_array_start(), type, and UT64_MAX.
Referenced by rz_cmd_eval_color_highlight_list_handler(), rz_comment_list_handler(), rz_meta_data_list_handler(), rz_meta_format_list_handler(), rz_meta_hidden_list_handler(), rz_meta_list_handler(), rz_meta_magic_list_handler(), rz_meta_string_list_handler(), and rz_meta_type_list_handler().
RZ_IPI void rz_core_meta_print_list_at | ( | RzCore * | core, |
ut64 | addr, | ||
RzCmdStateOutput * | state | ||
) |
Definition at line 326 of file cmeta.c.
References addr, rz_core_t::analysis, collect_nodes_at(), rz_interval_node_t::data, rz_analysis_t::meta_spaces, rz_cmd_state_output_array_end(), rz_cmd_state_output_array_start(), rz_core_meta_print(), RZ_META_TYPE_ANY, rz_pvector_foreach, rz_pvector_free(), rz_spaces_current(), and rz_interval_node_t::start.
Referenced by rz_meta_list_at_handler().
RZ_IPI void rz_core_meta_print_list_in_function | ( | RzCore * | core, |
RzAnalysisMetaType | type, | ||
ut64 | addr, | ||
RzCmdStateOutput * | state | ||
) |
Definition at line 370 of file cmeta.c.
References addr, print_meta_list(), rz_cmd_state_output_array_end(), rz_cmd_state_output_array_start(), and type.
Referenced by rz_cmd_eval_color_highlight_list_current_handler(), and rz_comment_function_list_handler().
RZ_API bool rz_core_meta_string_add | ( | RzCore * | core, |
ut64 | addr, | ||
ut64 | size, | ||
RzStrEnc | encoding, | ||
RZ_NULLABLE const char * | name | ||
) |
add a string to RzCore
core | RzCore of core that will be add to |
addr | string's address |
size | string's max size |
encoding | string's encoding |
name | string's value, or null that will be autodetect at addr |
Definition at line 474 of file cmeta.c.
References addr, rz_core_t::analysis, rz_core_t::blocksize, cmd_descs_generate::encoding, free(), limit, meta_string_8bit_add(), meta_string_guess_add(), n, NULL, out, rz_meta_set_with_subtype(), RZ_META_TYPE_STRING, RZ_STRING_ENC_8BIT, RZ_STRING_ENC_UTF8, RzDetectedString::size, RzDetectedString::type, and ut64().
Referenced by rz_core_meta_pascal_string_add(), rz_meta_string_8bit_handler(), rz_meta_string_handler(), rz_meta_string_utf8_handler(), rz_meta_string_wide16_handler(), and rz_meta_string_wide32_handler().
RZ_IPI void rz_core_spaces_print | ( | RzCore * | core, |
RzSpaces * | spaces, | ||
RzCmdStateOutput * | state | ||
) |
Definition at line 9 of file cmeta.c.
References count, pj_end(), pj_kb(), pj_ki(), pj_ks(), pj_o(), rz_cmd_state_output_array_end(), rz_cmd_state_output_array_start(), rz_cons_printf(), RZ_OUTPUT_MODE_JSON, RZ_OUTPUT_MODE_QUIET, RZ_OUTPUT_MODE_RIZIN, RZ_OUTPUT_MODE_STANDARD, rz_spaces_count(), rz_spaces_current(), rz_spaces_current_name(), rz_spaces_foreach, rz_warn_if_reached, s, and spaces().
Referenced by rz_flag_space_list_handler(), and rz_meta_space_list_handler().