Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | sdb_t |
struct | sdb_ns_t |
struct | sdb_diff_t |
Macros | |
#define | SDB_CDB_MIN_VALUE 1 |
#define | SDB_CDB_MAX_VALUE CDB_MAX_VALUE |
#define | SDB_CDB_MIN_KEY 1 |
#define | SDB_CDB_MAX_KEY CDB_MAX_KEY |
#define | SDB_MODE 0644 |
#define | SDB_RS ',' |
#define | SDB_SS "," |
#define | SDB_MAX_PATH 256 |
#define | SDB_NUM_BASE 16 |
#define | SDB_NUM_BUFSZ 64 |
#define | SDB_OPTION_NONE 0 |
#define | SDB_OPTION_ALL 0xff |
#define | SDB_OPTION_SYNC (1 << 0) |
#define | SDB_OPTION_NOSTAMP (1 << 1) |
#define | SDB_OPTION_FS (1 << 2) |
#define | SDB_OPTION_JOURNAL (1 << 3) |
#define | SDB_LIST_UNSORTED 0 |
#define | SDB_LIST_SORTED 1 |
#define | sdb_aforeach(x, y) |
#define | sdb_aforeach_next(x) |
Typedefs | |
typedef struct sdb_t | Sdb |
typedef struct sdb_ns_t | SdbNs |
typedef bool(* | SdbForeachCallback) (void *user, const char *k, const char *v) |
typedef struct sdb_diff_t | SdbDiff |
typedef void(* | SdbDiffCallback) (const SdbDiff *diff, void *user) |
typedef void(* | SdbHook) (Sdb *s, void *user, const char *k, const char *v) |
#define sdb_aforeach_next | ( | x | ) |
#define SDB_CDB_MAX_KEY CDB_MAX_KEY |
#define SDB_CDB_MAX_VALUE CDB_MAX_VALUE |
typedef struct sdb_diff_t SdbDiff |
Definition at line 351 of file sdb.c.
References key, s, sdb_exists(), sdb_set(), and val.
Referenced by sdb_num_add().
Definition at line 151 of file util.c.
References len, n, p, SDB_RS, and cmd_descs_generate::str.
Referenced by get_enum_type(), get_struct_type(), get_union_type(), rz_analysis_class_base_get_all(), rz_analysis_class_method_get_all(), rz_analysis_class_vtable_get_all(), sdb_array_delete(), sdb_array_get(), sdb_array_set(), sdb_array_size(), sdb_fmt_array(), and sdb_fmt_array_num().
Definition at line 167 of file util.c.
References len, n, p, SDB_RS, and cmd_descs_generate::str.
Referenced by sdb_array_length().
RZ_API char* sdb_anext | ( | char * | str, |
char ** | next | ||
) |
Definition at line 192 of file util.c.
References NULL, p, SDB_RS, and cmd_descs_generate::str.
Referenced by get_callable_type(), get_struct_type(), get_union_type(), rz_analysis_class_base_get(), rz_analysis_class_method_get(), rz_analysis_class_vtable_get(), rz_analysis_dwarf_integrate_functions(), and sdb_fmt_tobin().
Definition at line 224 of file array.c.
References key, NULL, s, sdb_array_contains(), sdb_array_insert(), and val.
Referenced by hook_command(), hook_flag_read(), hook_reg_read(), hook_reg_write(), rz_agraph_add_edge(), rz_agraph_add_node_with_color(), rz_analysis_class_rename_attr_raw(), rz_analysis_class_set_attr_raw(), sdb_array_add_num(), and sdb_querys().
Definition at line 211 of file array.c.
References key, NULL, s, sdb_array_add(), sdb_array_contains(), sdb_itoa(), SDB_NUM_BASE, SDB_NUM_BUFSZ, v, and val.
Referenced by core_analysis_graph_construct_edges(), hook_mem_read(), and hook_mem_write().
Definition at line 231 of file array.c.
References astrcmp(), cstring_cmp(), free(), i, key, malloc(), memcpy(), qsort(), s, sdb_const_anext(), sdb_const_get_len(), sdb_fmt_array(), SDB_RS, sdb_set_owned(), cmd_descs_generate::str, ut64(), and val.
Referenced by sdb_querys().
Definition at line 290 of file array.c.
References i, key, n, s, sdb_array_insert_num(), sdb_atoi(), sdb_const_anext(), sdb_const_get(), sdb_itoa(), SDB_NUM_BASE, SDB_NUM_BUFSZ, sdb_set(), cmd_descs_generate::str, and val.
Referenced by sdb_querys().
Definition at line 312 of file array.c.
References key, malloc(), memcpy(), s, sdb_const_get_len(), SDB_RS, sdb_set(), sdb_set_owned(), cmd_descs_generate::str, and val.
Definition at line 338 of file array.c.
References key, s, sdb_array_set_num(), and val.
Definition at line 497 of file array.c.
References key, len, s, sdb_const_get(), SDB_RS, and val.
Referenced by rz_analysis_class_rename_attr_raw(), rz_analysis_class_unique_attr_id_raw(), sdb_array_add(), sdb_array_add_num(), and sdb_array_contains_num().
Definition at line 491 of file array.c.
References key, num, s, sdb_array_contains(), sdb_itoa(), SDB_NUM_BASE, SDB_NUM_BUFSZ, and val.
Definition at line 456 of file array.c.
References free(), i, setup::idx, key, n, p, s, sdb_alen(), sdb_get(), SDB_RS, sdb_set_owned(), and cmd_descs_generate::str.
Referenced by sdb_array_remove(), sdb_array_remove_num(), and sdb_querys().
Definition at line 81 of file array.c.
References i, setup::idx, key, len, malloc(), memcpy(), n, NULL, p, s, sdb_alen(), sdb_const_get(), SDB_RS, cmd_descs_generate::str, and strdup().
Referenced by sdb_querys().
Definition at line 63 of file array.c.
References i, setup::idx, key, n, s, sdb_atoi(), sdb_const_get(), SDB_RS, and cmd_descs_generate::str.
Referenced by rz_syscall_get_num(), and sdb_querys().
Definition at line 139 of file array.c.
References Aindexof(), free(), setup::idx, key, malloc(), memcpy(), s, sdb_array_set(), sdb_const_get_len(), SDB_RS, sdb_set(), sdb_set_owned(), cmd_descs_generate::str, SZT_ADD_OVFCHK, val, and x.
Referenced by rz_agraph_add_edge_at(), sdb_array_add(), sdb_array_insert_num(), sdb_array_set(), and sdb_querys().
Definition at line 131 of file array.c.
References setup::idx, key, s, sdb_array_insert(), sdb_itoa(), SDB_NUM_BASE, and val.
Referenced by sdb_array_add_sorted_num().
Definition at line 524 of file array.c.
References key, s, sdb_alen_ignore_empty(), and sdb_const_get().
Referenced by sdb_querys().
Definition at line 589 of file array.c.
References key, s, and sdb_array_pop_head().
Referenced by sdb_array_pop_num(), and sdb_querys().
Definition at line 593 of file array.c.
References test_evm::end, free(), key, NULL, s, sdb_get(), SDB_RS, sdb_set(), sdb_unset(), and cmd_descs_generate::str.
Referenced by sdb_array_pop().
Definition at line 614 of file array.c.
References test_evm::end, free(), key, NULL, s, sdb_get(), SDB_RS, sdb_set_owned(), cmd_descs_generate::str, and strdup().
Definition at line 543 of file array.c.
References key, malloc(), memcpy(), s, sdb_const_get_len(), SDB_RS, sdb_set(), sdb_set_owned(), cmd_descs_generate::str, and val.
Referenced by sdb_array_push().
Definition at line 537 of file array.c.
References key, n, num, s, sdb_array_push(), sdb_itoa(), SDB_NUM_BASE, and SDB_NUM_BUFSZ.
Definition at line 533 of file array.c.
References key, s, sdb_array_prepend(), and val.
Referenced by sdb_array_prepend_num(), sdb_array_push_num(), and sdb_querys().
Definition at line 528 of file array.c.
References key, n, num, s, sdb_array_push(), sdb_itoa(), SDB_NUM_BASE, and SDB_NUM_BUFSZ.
Referenced by core_analysis_graph_construct_nodes().
Definition at line 436 of file array.c.
References astrcmp(), setup::idx, key, n, p, s, sdb_array_delete(), sdb_const_get(), SDB_RS, cmd_descs_generate::str, and val.
Referenced by rz_agraph_del_edge(), rz_agraph_del_node(), rz_analysis_class_delete_attr_raw(), rz_analysis_class_rename_attr_raw(), and sdb_querys().
Definition at line 394 of file array.c.
References setup::idx, key, n, num, p, s, sdb_array_delete(), sdb_atoi(), sdb_const_get(), SDB_RS, cmd_descs_generate::str, ut64(), and val.
Definition at line 342 of file array.c.
References Aindexof(), free(), i, setup::idx, key, len, malloc(), memcpy(), s, sdb_alen(), sdb_array_insert(), sdb_const_get_len(), SDB_RS, sdb_set(), sdb_set_owned(), cmd_descs_generate::str, and val.
Referenced by sdb_array_insert(), sdb_array_set_num(), sdb_array_unset(), and sdb_querys().
Definition at line 204 of file array.c.
References setup::idx, key, s, sdb_array_set(), sdb_itoa(), SDB_NUM_BASE, SDB_NUM_BUFSZ, and val.
Referenced by sdb_array_append_num(), and sdb_querys().
Definition at line 519 of file array.c.
References key, s, sdb_alen(), and sdb_const_get().
Definition at line 635 of file array.c.
References cstring_cmp(), free(), i, key, memcpy(), qsort(), s, sdb_fmt_array(), sdb_get_len(), SDB_RS, sdb_set_owned(), and cmd_descs_generate::str.
Referenced by sdb_querys().
Definition at line 667 of file array.c.
References free(), int_cmp(), key, malloc(), memset(), qsort(), s, sdb_fmt_array_num(), sdb_fmt_tostr(), sdb_get(), sdb_set_owned(), cmd_descs_generate::str, and ut64().
Referenced by sdb_querys().
Definition at line 308 of file array.c.
References setup::idx, key, s, and sdb_array_set().
Definition at line 116 of file util.c.
References test_evm::end, from, setup::idx, len, NULL, out, p, cmd_descs_generate::str, and to.
Definition at line 88 of file util.c.
Referenced by __computeTotal(), deserialize_checkpoints_cb(), deserialize_memory_cb(), deserialize_registers_cb(), rz_core_analysis_esil_init_mem(), sdb_array_add_sorted_num(), sdb_array_get_num(), sdb_array_pop_num(), sdb_array_remove_num(), sdb_fmt_array_num(), sdb_fmt_tobin(), sdb_num_get(), sdb_num_max(), sdb_num_min(), and sdb_querys().
Definition at line 76 of file num.c.
References b, sdb_const_get(), and cmd_descs_generate::str.
Referenced by get_callable_type(), rz_analysis_is_noreturn(), and rz_analysis_noreturn_at_addr().
Definition at line 72 of file num.c.
References sdb_set(), cmd_descs_generate::str, and v.
Referenced by agraph_sdb_init(), rz_analysis_noreturn_add(), and save_callable().
Definition at line 416 of file sdb.c.
References close, rz_socket_t::fd, free(), NULL, and s.
Referenced by __func_name_from_ord(), rz_analysis_function_cc_load_handler(), sdb_concat_by_path(), sdb_load_arch_platform_by_path(), sdb_load_arch_profile_by_path(), sdb_load_by_path(), sdb_load_from_string(), sdb_reset(), and session_sdb_save().
Definition at line 329 of file sdb.c.
References key, malloc(), memcpy(), p, s, sdb_const_get_len(), sdb_set(), sdb_set_owned(), and value.
Referenced by rz_core_search_rop(), and sdb_querys().
Definition at line 1041 of file sdb.c.
References options, s, sdb_journal_clear(), sdb_journal_close(), sdb_journal_load(), sdb_journal_open(), SDB_OPTION_FS, SDB_OPTION_JOURNAL, SDB_OPTION_NOSTAMP, and SDB_OPTION_SYNC.
Referenced by createdb(), main(), and sdb_grep_dump().
Definition at line 206 of file util.c.
References NULL, p, SDB_RS, and cmd_descs_generate::str.
Referenced by sdb_array_add_sorted(), and sdb_array_add_sorted_num().
Definition at line 279 of file sdb.c.
References key, NULL, s, and sdb_const_get_len().
Referenced by append_shortcut(), bin_elf_versioninfo_verneed(), bin_elf_versioninfo_versym(), bin_pe_versioninfo(), file_load(), get_atomic_type(), get_callable_type(), get_enum_type(), get_msg_type(), parse_format(), rz_analysis_cc_arg(), rz_analysis_cc_default(), rz_analysis_cc_error(), rz_analysis_cc_exist(), rz_analysis_cc_get(), rz_analysis_cc_max_arg(), rz_analysis_cc_ret(), rz_analysis_cc_self(), rz_analysis_syscc_default(), rz_core_analysis_esil_init_mem(), rz_core_bin_export_info(), rz_core_bin_get_compile_time(), rz_project_load(), rz_serialize_flag_load(), rz_syscall_get(), rz_syscall_get_i(), sdb_array_add_sorted_num(), sdb_array_contains(), sdb_array_get(), sdb_array_get_num(), sdb_array_indexof(), sdb_array_length(), sdb_array_remove(), sdb_array_remove_num(), sdb_array_size(), sdb_bool_get(), sdb_diff_kv_cb(), sdb_num_add(), sdb_num_exists(), sdb_num_get(), sdb_num_max(), sdb_num_min(), sdb_num_set(), and sdb_querys().
Definition at line 220 of file sdb.c.
References sdb_kv::cas, cdb_datalen, cdb_datapos, cdb_findnext(), cdb_findstart(), sdb_kv::expire, rz_socket_t::fd, found, key, len, NULL, pos, s, SDB_CDB_MAX_VALUE, sdb_ht_find_kvp(), sdb_now(), sdb_unset(), sdbkv_value(), sdbkv_value_len(), and ut64().
Referenced by sdb_array_add_sorted(), sdb_array_append(), sdb_array_insert(), sdb_array_prepend(), sdb_array_set(), sdb_concat(), sdb_const_get(), and sdb_get_len().
Definition at line 1084 of file sdb.c.
References copy_foreach_cb(), dst, ls_foreach, sdb_ns_t::name, sdb_ns_t::sdb, sdb_foreach(), sdb_ns(), and src.
Referenced by rz_serialize_analysis_cc_load(), rz_serialize_analysis_cc_save(), rz_serialize_analysis_classes_load(), rz_serialize_analysis_classes_save(), rz_serialize_analysis_function_noreturn_load(), rz_serialize_analysis_function_noreturn_save(), rz_serialize_flag_load(), rz_serialize_flag_save(), and session_sdb_load_ns().
Definition at line 163 of file sdb.c.
References count, rz_socket_t::fd, s, sdb_dump_begin(), and sdb_dump_hasnext().
Referenced by __update_modal(), and resolve_syscalls().
Definition at line 37 of file base64.c.
References calloc(), free(), in, len, NULL, out, and sdb_decode_raw().
Referenced by base64decode(), bin_pe_versioninfo(), compareString(), deserialize_checkpoints_cb(), foreach_list_cb(), meta_variable_comment_append(), rz_comment_unique_handler(), sdb_fmt_tobin(), and sdb_querys().
Definition at line 14 of file base64.c.
References len, and rz_base64_decode().
Referenced by sdb_decode().
RZ_API bool sdb_diff | ( | Sdb * | a, |
Sdb * | b, | ||
SdbDiffCallback | cb, | ||
void * | cb_user | ||
) |
Definition at line 6 of file diff.c.
References sdb_diff_t::add, APPENDF, sdb_diff_t::k, ls_foreach, sdb_diff_t::path, r, and sdb_diff_t::v.
Referenced by dbdiff_cb().
Definition at line 17 of file disk.c.
References cdb_make_start(), close, eprintf, free(), malloc(), memcpy(), O_BINARY, O_CREAT, O_RDWR, O_TRUNC, rz_file_dirname(), RZ_FREE, rz_sys_mkdirp(), s, SDB_MODE, cmd_descs_generate::str, and strdup().
Referenced by sdb_sync().
Definition at line 79 of file disk.c.
References cdb_init(), cdb_make_finish(), close, rz_socket_t::fd, free(), fsync, IFRET, NULL, rename, rz_sys_perror, s, and sdb_open().
Referenced by sdb_sync().
Definition at line 67 of file disk.c.
References c, cdb_make_add(), key, s, and val.
Referenced by _insert_into_disk(), insertkeys(), and sdb_sync().
Definition at line 1069 of file sdb.c.
References f, free(), s, and sdb_fini().
Referenced by rz_cmd_kuery().
Definition at line 835 of file sdb.c.
References rz_socket_t::fd, s, and seek_set().
Referenced by sdb_count(), sdb_foreach_cdb(), sdb_grep_dump(), sdb_isempty(), and sdb_stats().
Definition at line 877 of file sdb.c.
References cdb_getkvlen(), free(), getbytes(), key, malloc(), NULL, s, SDB_CDB_MAX_KEY, SDB_CDB_MAX_VALUE, SDB_CDB_MIN_KEY, and value.
Referenced by sdb_foreach_cdb(), and sdb_grep_dump().
Definition at line 844 of file sdb.c.
References cdb_getkvlen(), k, s, and v.
Referenced by sdb_count(), sdb_isempty(), and sdb_stats().
Definition at line 18 of file base64.c.
References calloc(), len, NULL, out, sdb_encode_raw(), and strdup().
Referenced by base64encode(), core_analysis_graph_nodes(), meta_variable_comment_print(), Pe_r_bin_store_string(), Pe_r_bin_store_string_table(), rz_agraph_add_node_with_color(), rz_core_meta_print(), rz_core_print_disasm_json(), sdb_fmt_tostr(), sdb_querys(), sdb_set_enc(), and serialize_checkpoints().
Definition at line 10 of file base64.c.
References len, and rz_base64_encode().
Referenced by sdb_encode().
Definition at line 358 of file sdb.c.
References cdb_datapos, cdb_findnext(), cdb_findstart(), cdb_read(), rz_socket_t::fd, found, key, pos, s, sdb_hash(), sdb_ht_find_kvp(), sdbkv_value(), and v.
Referenced by rz_analysis_class_create(), rz_analysis_class_delete_attr_raw(), rz_analysis_class_exists_raw(), and sdb_add().
Definition at line 971 of file sdb.c.
References sdb_kv::cas, sdb_kv::expire, found, key, s, sdb_ht_find_kvp(), and sdbkv_value().
Definition at line 930 of file sdb.c.
References calloc(), sdb_kv::cas, cdb_datalen, cdb_datapos, cdb_findnext(), cdb_findstart(), cdb_read(), sdb_kv::expire, rz_socket_t::fd, found, INT32_MAX, key, len, parse_expire(), pos, s, sdb_hash(), sdb_ht_find_kvp(), sdb_set_owned(), and sdbkv_value().
Definition at line 128 of file sdb.c.
References free(), NULL, s, sdb_lock(), sdb_lock_file(), sdb_unlock(), and strdup().
Referenced by rz_cmd_kuery(), and session_sdb_save().
Definition at line 209 of file fmt.c.
References len, list(), malloc(), memcpy(), NULL, sdb_alen(), sdb_anext2(), and cmd_descs_generate::str.
Referenced by sdb_array_add_sorted(), and sdb_array_sort().
Definition at line 184 of file fmt.c.
References len, list(), malloc(), n, NULL, sdb_alen(), sdb_anext2(), sdb_atoi(), cmd_descs_generate::str, and ut64().
Referenced by sdb_array_sort_num().
Definition at line 84 of file fmt.c.
References free(), setup::idx, n, RZ_MAX, sdb_anext(), sdb_atoi(), sdb_decode(), cmd_descs_generate::str, strdup(), and ut64().
Definition at line 43 of file fmt.c.
References concat, free(), len, n, NULL, out, p, RZ_MAX, sdb_encode(), sdb_itoa(), and ut64().
Referenced by sdb_array_sort_num().
RZ_API bool sdb_foreach | ( | Sdb * | s, |
SdbForeachCallback | cb, | ||
void * | user | ||
) |
Definition at line 758 of file sdb.c.
References BUCKET_FOREACH_SAFE, cb, count, i, NULL, s, sdb_foreach_cdb(), sdb_foreach_end(), sdbkv_key(), and sdbkv_value().
Referenced by deserialize_checkpoints(), deserialize_memory(), deserialize_registers(), load_flags(), rz_analysis_class_foreach(), rz_cmd_kuery(), rz_config_unserialize(), rz_debug_signal_list(), rz_display_opcode_handler(), rz_project_migrate_v1_v2(), rz_project_migrate_v2_v3(), rz_project_migrate_v3_v4(), rz_serialize_analysis_blocks_load(), rz_serialize_analysis_functions_load(), rz_serialize_analysis_global_var_load(), rz_serialize_analysis_hints_load(), rz_serialize_analysis_imports_load(), rz_serialize_analysis_meta_load(), rz_serialize_analysis_xrefs_load(), rz_serialize_bp_load(), rz_serialize_config_load(), rz_serialize_flag_zones_load(), rz_serialize_spaces_load(), rz_syscall_list(), sdb_copy(), sdb_diff_ctx(), sdb_diff_report(), sdb_foreach_list(), sdb_foreach_list_filter_user(), sdb_foreach_match(), sdb_like(), sdb_merge(), sdb_unset_like(), text_save(), and walk_namespace().
Definition at line 630 of file sdb.c.
References __cmp_asc(), list(), ls_newf(), ls_sort(), s, sdb_foreach(), sdb_foreach_list_cb(), and sdbkv_free().
Referenced by __delete_almighty(), __exec_almighty(), __init_almighty_db(), __set_rcb(), __update_modal(), rop_kuery(), rz_analysis_calling_conventions(), rz_analysis_class_get_all(), rz_analysis_noreturn_functions(), rz_cmd_search(), rz_core_bin_export_info(), rz_flag_tags_list(), sdb_load_arch_profile(), sdb_load_base_types(), sdb_load_platform_profile(), sdb_load_sysregs(), sdb_querys(), text_save(), and typelinks_load_sdb().
RZ_API SdbList* sdb_foreach_list_filter | ( | Sdb * | s, |
SdbForeachCallback | filter, | ||
bool | sorted | ||
) |
Definition at line 685 of file sdb.c.
References NULL, s, and sdb_foreach_list_filter_user().
Referenced by rz_analysis_dwarf_integrate_functions(), and sdb_load_callables().
RZ_API SdbList* sdb_foreach_list_filter_user | ( | Sdb * | s, |
SdbForeachCallback | filter, | ||
bool | sorted, | ||
void * | user | ||
) |
Definition at line 668 of file sdb.c.
References __cmp_asc(), filter(), foreach_list_filter_t::filter, list(), foreach_list_filter_t::list, ls_newf(), ls_sort(), NULL, s, sdb_foreach(), sdb_foreach_list_filter_cb(), sdbkv_free(), and foreach_list_filter_t::user.
Referenced by sdb_foreach_list_filter().
Definition at line 710 of file sdb.c.
References expr(), list(), ls_newf(), s, sdb_foreach(), sdb_foreach_match_cb(), and sdbkv_free().
Referenced by sdb_querys().
Definition at line 206 of file sdb.c.
References free(), NULL, s, and sdb_fini().
Referenced by _parse_resource_directory(), bin_pe_parse_imports(), config_path(), dbdiff(), dot_trace_traverse(), ds_free(), get_gnu_verneed(), get_gnu_versym(), get_vernaux_entry_sdb(), get_verneed_entry_sdb(), get_verneed_entry_sdb_aux(), ns_free_exc_list(), Pe_r_bin_store_string(), Pe_r_bin_store_string_table(), rz_agraph_free(), rz_analysis_esil_free(), rz_analysis_esil_stats(), rz_analysis_free(), rz_analysis_function_cc_load_handler(), rz_asm_free(), rz_asm_use(), rz_bin_elf_free(), rz_bin_elf_get_symbols_info(), rz_bin_file_free(), rz_bin_free(), rz_bin_mdmp_free_pe32_bin(), rz_bin_mdmp_free_pe64_bin(), rz_bin_object_set_items(), rz_core_bin_apply_relocs(), rz_core_fini(), rz_core_sysenv_begin(), rz_debug_free(), rz_debug_session_load(), rz_debug_session_save(), rz_egg_free(), rz_flag_free(), rz_main_rz_bin(), rz_project_free(), rz_project_load_file(), rz_project_load_file_raw(), rz_project_save_file(), rz_syscall_free(), rz_syscall_setup(), sdb_concat_by_path(), sdb_grep_dump(), sdb_load_arch_platform_by_path(), sdb_load_arch_profile_by_path(), sdb_load_by_path(), sdb_load_from_string(), sdb_ns_free(), sdb_ns_set(), session_sdb_load(), session_sdb_load_ns(), set_bin_relocs(), showcount(), and terminate().
Definition at line 290 of file sdb.c.
References key, NULL, s, and sdb_get_len().
Referenced by __create_panel_db(), __func_name_from_ord(), __search_db(), get_callable_type(), get_enum_type(), get_struct_type(), get_type_data(), get_typedef_type(), get_union_type(), rename_key(), resolveModuleOrdinal(), rz_analysis_class_base_get_all(), rz_analysis_class_delete(), rz_analysis_class_get_attr_raw(), rz_analysis_class_method_delete_class(), rz_analysis_class_method_get_all(), rz_analysis_class_method_rename_class(), rz_analysis_class_rename(), rz_analysis_class_rename_attr_raw(), rz_analysis_class_vtable_delete_class(), rz_analysis_class_vtable_get_all(), rz_analysis_class_vtable_rename_class(), rz_analysis_dwarf_integrate_functions(), rz_asm_describe(), rz_core_bin_apply_resources(), rz_core_bin_info_print(), rz_egg_option_get(), rz_flag_tags_get(), rz_serialize_core_load(), rz_serialize_spaces_load(), sdb_array_delete(), sdb_array_pop_head(), sdb_array_pop_tail(), sdb_array_sort_num(), sdb_load_platform_profile(), sdb_load_sysregs(), and sdb_querys().
Definition at line 285 of file sdb.c.
References key, NULL, s, sdb_const_get_len(), strdup(), and value.
Referenced by sdb_array_sort(), sdb_get(), and sdb_uncat().
Definition at line 22 of file util.c.
References NULL, s, and sdb_hash_len().
Referenced by __hashify(), cdb_make_add(), HtName_(), rz_il_vm_init(), rz_line_ns_completion_result_new(), sdb_exists(), sdb_expire_set(), sdb_ns(), sdb_ns_set(), sdb_querys(), sdb_set_internal(), and sigdb_entry_hash().
Definition at line 7 of file util.c.
References CDB_HASHSTART, count, h, len, and s.
Referenced by sdb_hash(), and sdb_hash_byte().
Definition at line 983 of file sdb.c.
References cb, i, ls_append(), ls_foreach, ls_new(), NULL, and s.
Referenced by sdb_new().
Definition at line 1019 of file sdb.c.
References i, k, ls_foreach, s, sdb_now(), and v.
Referenced by sdb_set_internal().
Definition at line 148 of file sdb.c.
References rz_socket_t::fd, s, sdb_dump_begin(), and sdb_dump_hasnext().
Referenced by rz_core_analysis_cc_init().
Definition at line 38 of file util.c.
References copy_string, free(), i, malloc(), n, NULL, and s.
Referenced by rz_core_analysis_esil_init_mem(), rz_open_binary_list_ascii_handler(), rz_table_tofancystring(), rz_table_tosimplestring(), sdb_array_add_num(), sdb_array_add_sorted_num(), sdb_array_contains_num(), sdb_array_insert_num(), sdb_array_prepend_num(), sdb_array_push_num(), sdb_array_set_num(), sdb_fmt_tostr(), sdb_itoca(), sdb_lock(), sdb_num_add(), sdb_num_set(), sdb_querys(), signature(), and xrefs_graph().
Definition at line 96 of file journal.c.
Referenced by sdb_config(), and sdb_sync().
Definition at line 13 of file journal.c.
References close, s, sdb_journal_filename(), and unlink.
Referenced by sdb_config(), sdb_fini(), and sdb_journal_unlink().
Definition at line 38 of file journal.c.
References eq, fd, free(), lseek, malloc(), NULL, read(), s, sdb_set(), SEEK_END, SEEK_SET, and cmd_descs_generate::str.
Referenced by sdb_config().
Definition at line 23 of file journal.c.
References close, O_APPEND, O_CREAT, O_RDWR, s, and sdb_journal_filename().
Referenced by sdb_config().
Definition at line 103 of file journal.c.
References s, sdb_journal_close(), sdb_journal_filename(), and unlink.
RZ_API char** sdb_like | ( | Sdb * | s, |
const char * | k, | ||
const char * | v, | ||
SdbForeachCallback | cb | ||
) |
Definition at line 1155 of file sdb.c.
References LikeCallbackData::array, LikeCallbackData::array_index, LikeCallbackData::array_size, calloc(), cb, free(), k, LikeCallbackData::key, like_cb(), NULL, s, sdb_foreach(), v, and LikeCallbackData::val.
Definition at line 29 of file lock.c.
References close, fd, O_CREAT, O_EXCL, O_TRUNC, O_WRONLY, pid, rz_sys_getpid(), s, sdb_itoa(), SDB_MODE, and write.
Referenced by sdb_file(), sdb_lock_wait(), and sdb_new().
Definition at line 14 of file lock.c.
References f, len, memcpy(), and NULL.
Referenced by sdb_file(), sdb_fini(), and sdb_new().
Definition at line 95 of file match.c.
References compareString(), flags, havePrefix(), haveSuffix(), SDB_LIKE_BASE64, SDB_LIKE_END, SDB_LIKE_ICASE, SDB_LIKE_NONE, SDB_LIKE_START, and cmd_descs_generate::str.
Referenced by like_cb(), and unset_cb().
Definition at line 144 of file sdb.c.
References d, s, sdb_foreach(), and sdb_merge_cb().
Referenced by rz_analysis_function_cc_load_handler(), and sdb_concat_by_path().
Definition at line 47 of file sdb.c.
References cdb_init(), close, fail, rz_socket_t::fd, free(), global_hook, global_user, lock(), ls_new(), malloc(), memcpy(), NULL, path, RZ_NEW0, s, sdb_hook(), sdb_ht_new(), sdb_lock(), sdb_lock_file(), sdb_lock_wait(), sdb_now(), sdb_open(), and strdup().
Referenced by __func_name_from_ord(), bin_pe_parse_imports(), config_path(), createdb(), dbdiff(), load_sdb(), main(), rz_analysis_function_cc_load_handler(), rz_asm_use(), rz_cmd_kuery(), rz_core_init(), rz_core_sysenv_begin(), rz_debug_signal_init(), rz_egg_new(), rz_main_rz_bin(), sdb_concat_by_path(), sdb_grep_dump(), sdb_load_arch_platform_by_path(), sdb_load_arch_profile_by_path(), sdb_load_by_path(), sdb_new0(), set_bin_relocs(), and showcount().
Definition at line 43 of file sdb.c.
References NULL, and sdb_new().
Referenced by __init(), _parse_resource_directory(), _store_resource_sdb(), agraph_init(), dot_trace_traverse(), get_gnu_verneed(), get_gnu_versym(), get_sdb(), get_vernaux_entry_sdb(), get_verneed_entry_sdb_aux(), init_msg_types(), load_buffer(), Pe_r_bin_store_fixed_file_info(), Pe_r_bin_store_resource_version_info(), Pe_r_bin_store_string(), Pe_r_bin_store_string_file_info(), Pe_r_bin_store_string_table(), Pe_r_bin_store_var(), Pe_r_bin_store_var_file_info(), rz_analysis_esil_stats(), rz_analysis_new(), rz_bin_dmp64_new_buf(), rz_bin_elf_get_symbols_info(), rz_bin_elf_new_buf(), rz_bin_file_new(), rz_bin_mdmp_new_buf(), rz_bin_mz_init(), rz_bin_new(), rz_bin_pe_new_buf(), rz_bin_te_new_buf(), rz_debug_session_save(), rz_flag_new(), rz_project_load_file_raw(), rz_project_save_file(), rz_syscall_new(), sdb_load_from_string(), sdb_ns_new(), session_sdb_load(), session_sdb_load_ns(), and ssa_get().
Definition at line 211 of file util.c.
References rz_time_now(), and ut64().
Referenced by parse_expire(), sdb_const_get_len(), sdb_hook_call(), and sdb_new().
Definition at line 186 of file ns.c.
References create(), sdb_ns_t::hash, ls_append(), ls_foreach, NULL, s, sdb_ns_t::sdb, sdb_hash(), and sdb_ns_new().
Referenced by core_analysis_graph_nodes(), file_save_cb(), load_process_line(), print_rop(), rop_classify(), rop_kuery(), rz_analysis_dwarf_process_info(), rz_analysis_new(), rz_cmd_kuery(), rz_cmd_search(), rz_core_analysis_everything(), rz_core_bin_export_info(), rz_core_bin_get_compile_time(), rz_core_search_rop(), rz_debug_session_serialize(), rz_project_load(), rz_project_migrate_v1_v2(), rz_project_migrate_v2_v3(), rz_project_migrate_v3_v4(), rz_project_migrate_v5_v6(), rz_project_save(), rz_serialize_analysis_classes_load(), rz_serialize_analysis_meta_load(), rz_serialize_analysis_meta_save(), rz_serialize_analysis_save(), rz_serialize_core_save(), rz_serialize_debug_save(), rz_serialize_flag_load(), rz_serialize_flag_save(), rz_serialize_io_files_save(), rz_serialize_io_save(), rz_serialize_spaces_load(), rz_serialize_spaces_save(), sdb_copy(), sdb_diff_ctx(), sdb_ns_path(), sdb_querys(), and update_sdb().
Definition at line 74 of file ns.c.
References list(), ls_free(), ls_new(), ns_free_exc_list(), NULL, and s.
Referenced by sdb_fini().
Definition at line 213 of file ns.c.
References create(), free(), path, s, sdb_ns(), cmd_descs_generate::str, and strdup().
Referenced by bin_elf_versioninfo_verneed(), bin_elf_versioninfo_versym(), bin_pe_versioninfo(), rz_cmd_kuery(), rz_core_bin_apply_resources(), and session_sdb_load_ns().
Definition at line 156 of file ns.c.
References sdb_ns_t::hash, ls_append(), ls_foreach, sdb_ns_t::name, r, RZ_NEW, s, sdb_ns_t::sdb, sdb_free(), sdb_hash(), and strdup().
Referenced by _parse_resource_directory(), _store_resource_sdb(), get_gnu_verneed(), get_sdb(), get_verneed_entry_sdb(), init_symbols_info_aux(), load(), load_buffer(), Pe_r_bin_store_resource_version_info(), Pe_r_bin_store_string_file_info(), Pe_r_bin_store_string_table(), Pe_r_bin_store_var_file_info(), rz_bin_elf_get_symbols_info(), rz_bin_object_new(), update_sdb(), and update_syscall_ns().
Definition at line 136 of file ns.c.
References ls_delete(), ls_foreach, sdb_ns_t::name, r, s, sdb_ns_t::sdb, and sdb_ns_free().
Referenced by rz_project_migrate_v6_v7(), rz_project_migrate_v7_v8(), and update_syscall_ns().
Definition at line 18 of file num.c.
References b, key, NULL, s, sdb_add(), sdb_const_get(), sdb_itoa(), sdb_num_base(), SDB_NUM_BUFSZ, v, and val.
Referenced by rz_core_bin_apply_all_info().
Definition at line 221 of file util.c.
References s, and SDB_NUM_BASE.
Referenced by sdb_num_add(), sdb_num_set(), and sdb_querys().
Definition at line 43 of file num.c.
References c, key, n, s, sdb_num_get(), sdb_num_set(), sdb_set(), and ut64().
Referenced by sdb_querys().
Definition at line 13 of file num.c.
References key, s, sdb_atoi(), sdb_const_get(), and v.
Referenced by _parse_resource_directory(), add_tls_callbacks(), bin_elf_versioninfo_verneed(), bin_elf_versioninfo_versym(), bin_pe_versioninfo(), get_atomic_type(), get_callable_type(), get_entrypoint(), get_graphtrace_node(), rz_analysis_dwarf_integrate_functions(), rz_core_bin_apply_resources(), rz_core_bin_info_print(), rz_debug_session_deserialize(), rz_debug_signal_what(), rz_project_migrate_v4_v5(), rz_syscall_get_swi(), sdb_load_arch_profile(), sdb_load_platform_profile(), sdb_load_sysregs(), sdb_num_dec(), sdb_num_inc(), sdb_ptr_get(), siglistcb(), siglistjsoncb(), and ssa_get().
Definition at line 32 of file num.c.
References c, key, n, s, sdb_num_get(), sdb_num_set(), and ut64().
Referenced by sdb_querys(), and ssa_set().
Definition at line 65 of file num.c.
References a, k, n, NULL, sdb_atoi(), sdb_const_get(), and sdb_num_set().
Definition at line 58 of file num.c.
References a, k, n, NULL, sdb_atoi(), sdb_const_get(), and sdb_num_set().
Definition at line 25 of file num.c.
References b, key, NULL, s, sdb_const_get(), sdb_itoa(), sdb_num_base(), SDB_NUM_BUFSZ, sdb_set(), v, and val.
Referenced by _store_resource_sdb(), agraph_set_layout(), bin_pe_init_hdr(), bin_pe_init_overlay(), bin_pe_store_tls_callbacks(), bootimg_header_load(), core_analysis_graph_construct_edges(), core_analysis_graph_construct_nodes(), core_analysis_graph_nodes(), get_class_ro_t(), get_elf_intrp(), get_entrypoint(), get_gnu_verneed(), get_gnu_versym(), get_graphtrace_node(), get_sdb(), get_vernaux_entry_sdb(), get_verneed_entry_sdb_aux(), info(), init_dynstr_sdb(), init_ehdr_sdb(), init_hdr(), init_items(), init_phdr_sdb(), init_shdr_sdb(), init_shstrtab_sdb(), java_set_sdb(), parse_segments(), parse_thread(), Pe_r_bin_store_fixed_file_info(), Pe_r_bin_store_var(), rz_bin_mdmp_init_directory(), rz_bin_mdmp_init_directory_entry(), rz_bin_mdmp_init_hdr(), rz_bin_mz_init_hdr(), rz_bin_te_init_hdr(), rz_debug_session_serialize(), save_callable(), sdb_num_dec(), sdb_num_inc(), sdb_num_max(), sdb_num_min(), sdb_ptr_set(), and update_graph_sizes().
Definition at line 383 of file sdb.c.
References cdb_init(), close, eprintf, rz_socket_t::fd, free(), fstat, NULL, O_BINARY, O_RDONLY, s, and strdup().
Referenced by load_sdb(), sdb_disk_finish(), sdb_new(), and session_sdb_load_ns().
Definition at line 87 of file num.c.
References key, and sdb_num_get().
Referenced by __create_almighty(), __exec_almighty(), __set_rcb(), and rz_analysis_esil_fire_trap().
Definition at line 83 of file num.c.
References key, p, sdb_num_set(), and ut64().
Referenced by __init_almighty_db(), and __init_rotate_db().
Definition at line 785 of file query.c.
References cmd, free(), out, s, and sdb_querys().
Referenced by __sdb_prompt(), init_msg_types(), insertkeys(), main(), rz_main_rz_bin(), sdb_query_lines(), and sdb_queryf().
Definition at line 856 of file query.c.
References free(), s, sdb_query_lines(), and slurp().
Referenced by sdb_querys().
Definition at line 800 of file query.c.
References cmd, free(), op, p, s, sdb_query(), and strdup().
Referenced by sdb_load_from_string(), and sdb_query_file().
Definition at line 57 of file query.c.
References s, sdb_query(), and vsnprintf.
Referenced by rz_debug_signal_setup().
Definition at line 164 of file query.c.
References calloc(), cmd, d, encode(), eprintf, eq, fail, foreach_list_cb(), free(), i, setup::idx, isspace, len, list(), ls_foreach, ls_free(), malloc(), memcpy(), n, sdb_ns_t::name, NULL, ok, out, out_concat, p, PFMT64x, r, repeat(), root, s, sdb_array_add(), sdb_array_add_sorted(), sdb_array_add_sorted_num(), sdb_array_delete(), sdb_array_get(), sdb_array_get_num(), sdb_array_insert(), sdb_array_length(), sdb_array_pop(), sdb_array_push(), sdb_array_remove(), sdb_array_set(), sdb_array_set_num(), sdb_array_sort(), sdb_array_sort_num(), sdb_atoi(), sdb_concat(), sdb_const_get(), sdb_decode(), sdb_encode(), sdb_fmt(), sdb_foreach_list(), sdb_foreach_match(), sdb_get(), sdb_hash(), sdb_isnum(), sdb_itoa(), sdb_ns(), sdb_num_base(), sdb_num_dec(), sdb_num_inc(), SDB_OPTION_FS, sdb_query_file(), SDB_RS, sdb_set(), sdb_set_owned(), sdb_type(), sdb_uncat(), sdb_unset_like(), sdbkv_key(), sdbkv_value(), snprintf, st64, strbuf_append(), strbuf_free(), strbuf_new(), strdup(), autogen_x86imm::tmp, type, ut64(), val, w, and walk_namespace().
Referenced by autocomplete_sdb(), cmd_analysis_esil(), DEFINE_HANDLE_TS_FCN_AND_SYMBOL(), num_callback(), rop_classify_arithmetic(), rop_classify_arithmetic_const(), rop_classify_constant(), rop_classify_mov(), rop_classify_nops(), rop_kuery(), rz_cmd_info_kuery(), rz_cmd_kuery(), rz_core_agraph_print_sdb(), rz_core_cmd_foreach(), rz_core_cmd_subst_i(), rz_core_graph_print(), rz_core_kuery_print(), sdb_query(), and sdb_querysf().
Definition at line 299 of file sdb.c.
References key, s, and sdb_ht_delete().
Referenced by __delete_almighty(), rename_key(), rz_analysis_class_delete(), rz_analysis_class_delete_attr_raw(), rz_analysis_class_rename_attr_raw(), and sdb_sync().
Definition at line 433 of file sdb.c.
References s, sdb_close(), sdb_ht_free(), and sdb_ht_new().
Referenced by cmd_analysis_esil(), load_sdb(), rz_agraph_reset(), rz_analysis_esil_stats(), rz_analysis_purge(), rz_core_analysis_cc_init(), rz_core_analysis_esil_deinit(), rz_flag_tags_reset(), rz_serialize_analysis_classes_load(), rz_serialize_analysis_function_noreturn_load(), and rz_type_cc_del_all_handler().
Definition at line 611 of file sdb.c.
References key, s, sdb_set_internal(), and val.
Referenced by __init_sdb(), _store_resource_sdb(), art_header_load(), bin_pe_init_hdr(), block_store(), bootimg_header_load(), copy_foreach_cb(), core_analysis_graph_construct_edges(), core_analysis_graph_construct_nodes(), core_analysis_graph_nodes(), file_save(), file_save_cb(), flag_save_cb(), function_store(), get_bbnodes(), get_bbupdate(), get_class_ro_t(), get_elf_intrp(), get_gnu_versym(), get_libs(), get_sdb(), get_vernaux_entry_sdb(), get_verneed_entry_sdb_aux(), hints_acc_store_cb(), info(), init_dt_dynamic_sdb(), init_ehdr_sdb(), init_items(), init_phdr_sdb(), init_sdb_formats(), init_shdr_sdb(), java_set_sdb(), kv_loadlibs(), lmf_header_load(), load_process_line(), parse_segments(), parse_signature(), Pe_r_bin_store_string(), Pe_r_bin_store_string_table(), rename_key(), rop_classify(), rz_agraph_del_node(), rz_agraph_set_curnode(), rz_agraph_set_title(), rz_analysis_cc_set(), rz_analysis_cc_set_error(), rz_analysis_cc_set_self(), rz_analysis_class_create(), rz_analysis_class_rename_attr_raw(), rz_analysis_class_set_attr_raw(), rz_analysis_set_cc_default(), rz_analysis_set_syscc_default(), rz_bin_mdmp_init_directory(), rz_bin_mdmp_init_directory_entry(), rz_bin_mdmp_init_hdr(), rz_bin_mdmp_init_parsing(), rz_bin_mz_init_hdr(), rz_bin_te_init_hdr(), rz_config_serialize(), rz_core_analysis_esil_init_mem(), rz_debug_signal_init(), rz_egg_option_set(), rz_flag_tags_set(), rz_project_migrate_v4_v5(), rz_project_save(), rz_serialize_analysis_global_var_save(), rz_serialize_analysis_imports_save(), rz_serialize_bp_save(), rz_serialize_config_save(), rz_serialize_core_save(), rz_serialize_flag_save(), rz_serialize_flag_zones_save(), rz_serialize_spaces_save(), save_atomic_type(), save_callable(), save_enum(), save_struct(), save_typedef(), save_typelink(), save_union(), sdb_add(), sdb_array_add_sorted_num(), sdb_array_append(), sdb_array_insert(), sdb_array_pop_head(), sdb_array_prepend(), sdb_array_set(), sdb_bool_set(), sdb_concat(), sdb_journal_load(), sdb_merge_cb(), sdb_num_dec(), sdb_num_set(), sdb_querys(), sdb_save_dwarf_function(), sdb_set_enc(), sdb_unset(), serialize_checkpoints(), serialize_memory_cb(), serialize_register_cb(), store_xrefs_list_cb(), v1_v2_types_foreach_cb(), and v2_v3_types_foreach_cb().
Definition at line 607 of file sdb.c.
References key, s, sdb_set_internal(), and val.
Referenced by bin_pe_init_hdr(), get_vernaux_entry_sdb(), get_versym_entry_sdb_from_verdef(), get_versym_entry_sdb_from_verneed(), rz_agraph_add_node_with_color(), sdb_array_add_sorted(), sdb_array_append(), sdb_array_delete(), sdb_array_insert(), sdb_array_pop_tail(), sdb_array_prepend(), sdb_array_set(), sdb_array_sort(), sdb_array_sort_num(), sdb_concat(), sdb_expire_set(), sdb_querys(), and sdb_uncat().
Definition at line 856 of file sdb.c.
References count, rz_socket_t::fd, mem, s, sdb_dump_begin(), and sdb_dump_hasnext().
Referenced by showcount().
Definition at line 803 of file sdb.c.
References _insert_into_disk(), _remove_afer_insert(), BUCKET_FOREACH_SAFE, count, sdb_kv::expire, i, s, sdb_disk_create(), sdb_disk_finish(), sdb_disk_insert(), sdb_foreach_cdb(), sdb_journal_clear(), sdb_remove(), sdbkv_key(), and sdbkv_value().
Referenced by config_path(), createdb(), ns_sync(), rz_cmd_kuery(), rz_core_sysenv_begin(), session_sdb_save(), and terminate().
Definition at line 405 of file text.c.
References calloc(), close, fd, free(), fstat, MAP_PRIVATE, mmap, munmap, O_BINARY, O_RDONLY, PROT_READ, PROT_WRITE, r, read(), s, sdb_text_load_buf(), and x.
Referenced by createdb(), and rz_project_load_file_raw().
Definition at line 386 of file text.c.
References load_ctx_fini(), load_ctx_init(), load_process_final_line(), load_process_single_char(), s, and STATE_NEWLINE.
Referenced by createdb(), and sdb_text_load().
Definition at line 189 of file text.c.
References fd, ls_free(), ls_new(), path, r, s, and text_save().
Referenced by sdb_text_save().
Definition at line 304 of file sdb.c.
References free(), key, mod(), NULL, p, s, sdb_get_len(), sdb_set_owned(), v, and value.
Referenced by sdb_querys().
Definition at line 60 of file lock.c.
Referenced by sdb_file(), and sdb_fini().
Definition at line 294 of file sdb.c.
References key, s, and sdb_set().
Referenced by rz_analysis_cc_del(), rz_analysis_noreturn_drop(), rz_core_analysis_esil_init_mem_del(), rz_project_migrate_v1_v2(), rz_project_migrate_v2_v3(), rz_project_migrate_v3_v4(), rz_project_migrate_v7_v8(), sdb_array_pop_head(), sdb_const_get_len(), and unset_cb().
Definition at line 1106 of file sdb.c.
References k, s, sdb_foreach(), and unset_cb().
Referenced by sdb_querys().