Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | rz_vector_t |
struct | rz_pvector_t |
Macros | |
#define | rz_vector_foreach(vec, it) |
#define | rz_vector_foreach_prev(vec, it) |
#define | rz_vector_enumerate(vec, it, i) |
#define | rz_vector_lower_bound(vec, x, i, cmp) |
#define | rz_vector_upper_bound(vec, x, i, cmp) |
#define | rz_pvector_foreach(vec, it) for (it = (void **)(vec)->v.a; (vec)->v.len && it != (void **)(vec)->v.a + (vec)->v.len; it++) |
#define | rz_pvector_foreach_prev(vec, it) for (it = ((vec)->v.len == 0 ? NULL : (void **)(vec)->v.a + (vec)->v.len - 1); it && it != (void **)(vec)->v.a - 1; it--) |
#define | rz_array_lower_bound(array, len, x, i, cmp) |
#define | rz_array_upper_bound(array, len, x, i, cmp) |
#define | rz_array_find(array, x, itr, start, stop, cmp) |
Find an element elem in the array , lying within start and stop index such that cmp(x, elem) == 0 The index of the element elem is stored in itr If itr == stop , then no such element was found. More... | |
#define | rz_pvector_lower_bound(vec, x, i, cmp) rz_array_lower_bound((void **)(vec)->v.a, (vec)->v.len, x, i, cmp) |
#define | rz_pvector_upper_bound(vec, x, i, cmp) rz_array_upper_bound((void **)(vec)->v.a, (vec)->v.len, x, i, cmp) |
Typedefs | |
typedef int(* | RzPVectorComparator) (const void *a, const void *b) |
typedef int(* | RzVectorComparator) (const void *a, const void *b) |
typedef void(* | RzVectorFree) (void *e, void *user) |
typedef void(* | RzPVectorFree) (void *e) |
typedef struct rz_vector_t | RzVector |
typedef struct rz_pvector_t | RzPVector |
Find an element elem in the array
, lying within start
and stop
index such that cmp(x, elem)
== 0 The index of the element elem is stored in itr
If itr
== stop
, then no such element was found.
Definition at line 393 of file rz_vector.h.
Definition at line 351 of file rz_vector.h.
#define rz_pvector_foreach | ( | vec, | |
it | |||
) | for (it = (void **)(vec)->v.a; (vec)->v.len && it != (void **)(vec)->v.a + (vec)->v.len; it++) |
Definition at line 334 of file rz_vector.h.
#define rz_pvector_foreach_prev | ( | vec, | |
it | |||
) | for (it = ((vec)->v.len == 0 ? NULL : (void **)(vec)->v.a + (vec)->v.len - 1); it && it != (void **)(vec)->v.a - 1; it--) |
Definition at line 338 of file rz_vector.h.
#define rz_pvector_lower_bound | ( | vec, | |
x, | |||
i, | |||
cmp | |||
) | rz_array_lower_bound((void **)(vec)->v.a, (vec)->v.len, x, i, cmp) |
Definition at line 412 of file rz_vector.h.
#define rz_pvector_upper_bound | ( | vec, | |
x, | |||
i, | |||
cmp | |||
) | rz_array_upper_bound((void **)(vec)->v.a, (vec)->v.len, x, i, cmp) |
Definition at line 424 of file rz_vector.h.
#define rz_vector_enumerate | ( | vec, | |
it, | |||
i | |||
) |
Definition at line 177 of file rz_vector.h.
#define rz_vector_foreach | ( | vec, | |
it | |||
) |
Definition at line 169 of file rz_vector.h.
#define rz_vector_foreach_prev | ( | vec, | |
it | |||
) |
Definition at line 173 of file rz_vector.h.
typedef struct rz_pvector_t RzPVector |
Definition at line 40 of file rz_vector.h.
typedef void(* RzPVectorFree) (void *e) |
Definition at line 43 of file rz_vector.h.
typedef struct rz_vector_t RzVector |
Definition at line 41 of file rz_vector.h.
typedef void(* RzVectorFree) (void *e, void *user) |
Definition at line 42 of file rz_vector.h.
Definition at line 236 of file rz_vector.h.
References rz_vector_t::a, NULL, rz_return_val_if_fail, v, and rz_pvector_t::v.
Referenced by __core_visual_gogo(), analysis_block_cb(), analysis_block_on_exit(), cmp(), cmplen(), core_get_file(), dex_create_relocations(), dex_new_encoded_method(), dex_print_encoded_field(), dex_print_encoded_method(), dex_resolve_all_virtual_methods(), dex_resolve_entrypoints_in_class(), dex_resolve_fields_in_class(), dex_resolve_fields_in_class_as_symbols(), dex_resolve_methods_in_class(), dex_resolve_proto_id(), dex_resolve_string_id_native(), dex_resolve_symbol_in_class_methods(), get_max_common_pfx(), get_relocs(), print_log(), print_new_results(), propagate_return_type(), propagate_types_among_used_variables(), rz_analysis_esil_get_instruction_trace(), rz_analysis_function_delete_vars_by_kind(), rz_analysis_get_used_function_var(), rz_analysis_var_delete(), rz_bin_dex_resolve_field_by_idx(), rz_bin_dex_resolve_method_by_idx(), rz_bin_dex_resolve_method_offset_by_idx(), rz_bin_source_line_info_builder_build_and_fini(), rz_cmd_dexe_handler(), rz_cmd_dexs_handler(), rz_core_file_close(), rz_core_get_boundaries_prot(), rz_il_validate_global_context_new_from_vm(), rz_il_vm_add_mem(), rz_il_vm_get_mem(), rz_io_map_cleanup(), rz_io_map_del(), rz_io_map_del_for_fd(), rz_io_map_depriorize(), rz_io_map_priorize(), rz_io_map_priorize_for_fd(), rz_line_autocomplete(), rz_pvector_pop(), rz_pvector_pop_front(), rz_pvector_remove_at(), rz_rows_cmp(), rz_table_filter(), rz_test_main(), type_pos_hit(), and vars_resolve_overlaps().
Definition at line 326 of file vector.c.
References rz_return_if_fail, rz_vector_clear(), and rz_pvector_t::v.
Referenced by clear_bb_vars(), cmd_desc_free(), interact(), run_rz_test(), rz_analysis_block_recurse(), rz_analysis_block_recurse_followthrough(), rz_analysis_block_shortest_path(), rz_analysis_function_delete_all_vars(), rz_analysis_rtti_msvc_recover_all(), rz_io_cache_reset(), rz_io_map_fini(), rz_io_map_priorize_for_fd(), rz_line_completion_clear(), rz_serialize_analysis_load(), rz_subprocess_fini(), rz_test_main(), rz_test_run_asm_test(), and rz_test_test_database_free().
Definition at line 344 of file vector.c.
References rz_vector_t::a, i, rz_vector_t::len, NULL, rz_return_val_if_fail, rz_pvector_t::v, and x.
Referenced by rz_analysis_var_set_access(), and rz_pvector_remove_data().
|
inlinestatic |
Definition at line 257 of file rz_vector.h.
References rz_vector_t::a, NULL, rz_return_val_if_fail, and rz_pvector_t::v.
Referenced by rz_line_autocomplete(), and selection_widget_update().
Definition at line 246 of file rz_vector.h.
References rz_pvector_len().
Referenced by __core_visual_gogo(), clear_bb_vars(), function_store(), interact(), map_multi_dex(), print_instruction_ops(), propagate_return_type(), propagate_return_type_pointer(), propagate_types_among_used_variables(), rz_analysis_block_recurse(), rz_analysis_block_recurse_followthrough(), rz_analysis_block_shortest_path(), rz_analysis_function_derive_args(), rz_analysis_function_set_type(), rz_analysis_get_used_function_var(), rz_core_file_close(), rz_line_autocomplete(), rz_test_main(), rz_tree_bfs(), and worker_th().
Definition at line 331 of file vector.c.
References rz_return_if_fail, rz_vector_fini(), and rz_pvector_t::v.
Referenced by __cons_pal_update_event(), bin_section_map_fini(), core_cmd_tsrzcmd(), parse_line_header_source(), print_source_info(), rz_analysis_il_config_free(), rz_bin_reloc_storage_new(), rz_bin_source_line_info_builder_build_and_fini(), rz_core_file_free(), rz_core_recover_vars(), rz_il_vm_fini(), rz_io_cache_fini(), and rz_line_ns_completion_result_free().
|
inlinestatic |
Definition at line 320 of file rz_vector.h.
References rz_vector_flush(), and rz_pvector_t::v.
Referenced by parse_line_header_source(), and rz_bin_reloc_storage_new().
Definition at line 336 of file vector.c.
References free(), rz_vector_fini(), and rz_pvector_t::v.
Referenced by bin_pe_dotnet_destroy_clr(), can_emulate_metadata(), core_analysis_bytes_json(), core_analysis_bytes_standard(), database_load(), del(), ds_disassemble(), ds_print_meta_infos(), fcn_takeover_block_recursive_followthrough_cb(), get_relocs(), inst_vars_kv_free(), mach0_free(), requires_op_size(), rz_analysis_esil_trace_free(), rz_analysis_fcn(), rz_analysis_function_args(), rz_analysis_function_delete_unused_vars(), rz_analysis_function_derive_args(), rz_analysis_function_set_type(), rz_analysis_il_trace_instruction_free(), rz_analysis_reflines_get(), rz_analysis_rzil_trace_free(), rz_analysis_var_resolve_overlaps(), rz_annotated_code_line_offsets(), rz_bin_dex_free(), rz_bin_object_p2v_all(), rz_cmd_debug_traces_esil_delete_handler(), rz_core_analysis_bytes(), rz_core_analysis_esil(), rz_core_analysis_get_stats(), rz_core_analysis_il_vm_status(), rz_core_meta_print_list_at(), rz_core_print_disasm_json(), rz_core_visual_analysis(), rz_il_validate_global_context_new_from_vm(), rz_pvector_new_with_len(), rz_table_columns(), rz_table_row_fini(), rz_test_load_asm_test_file(), rz_test_load_cmd_test_file(), rz_test_main(), rz_tree_bfs(), rz_type_callable_free(), and var_functions_show().
|
inlinestatic |
Definition at line 263 of file rz_vector.h.
References rz_vector_t::a, NULL, rz_return_val_if_fail, and rz_pvector_t::v.
Definition at line 251 of file rz_vector.h.
References rz_vector_t::a, NULL, rz_return_val_if_fail, v, and rz_pvector_t::v.
Referenced by function_argument_type_derive(), rz_analysis_function_set_type(), rz_table_columns(), rz_type_func_args_name(), and rz_type_func_args_type().
RZ_API void rz_pvector_init | ( | RzPVector * | vec, |
RzPVectorFree | free | ||
) |
Definition at line 298 of file vector.c.
References free(), NULL, pvector_free_elem(), rz_vector_init(), and rz_pvector_t::v.
Referenced by __cons_pal_update_event(), core_cmd_tsrzcmd(), core_file_new(), create_cmd_desc(), interact(), parse_line_header_source(), print_source_info(), run_rz_test(), rz_analysis_block_recurse(), rz_analysis_block_recurse_followthrough(), rz_analysis_block_shortest_path(), rz_analysis_function_new(), rz_analysis_il_config_new(), rz_analysis_rtti_msvc_recover_all(), rz_bin_object_sections_mapping_list(), rz_bin_reloc_storage_new(), rz_bin_source_line_info_builder_build_and_fini(), rz_core_recover_vars(), rz_il_vm_init(), rz_io_cache_init(), rz_io_map_init(), rz_io_map_priorize_for_fd(), rz_line_completion_init(), rz_line_ns_completion_result_new(), rz_pvector_new(), rz_serialize_analysis_load(), rz_subprocess_init(), rz_test_main(), rz_test_run_asm_test(), and rz_test_test_database_new().
Definition at line 284 of file rz_vector.h.
References rz_vector_insert(), rz_pvector_t::v, and x.
Referenced by rz_analysis_function_args().
|
inlinestatic |
Definition at line 289 of file rz_vector.h.
References count, rz_vector_insert_range(), and rz_pvector_t::v.
Referenced by rz_io_map_priorize_for_fd(), and rz_test_main().
Definition at line 231 of file rz_vector.h.
References rz_vector_t::len, rz_return_val_if_fail, and rz_pvector_t::v.
Referenced by __cons_pal_update_event(), __core_visual_gogo(), analysis_block_cb(), analysis_block_on_exit(), dex_create_relocations(), dex_new_encoded_method(), dex_resolve_all_virtual_methods(), dex_resolve_entrypoints_in_class(), dex_resolve_fields_in_class(), dex_resolve_fields_in_class_as_symbols(), dex_resolve_methods_in_class(), dex_resolve_proto_id(), dex_resolve_string_id_native(), dex_resolve_symbol_in_class_methods(), function_argument_type_derive(), get_relocs(), interact(), needs_reloc_patching(), parse_line_header_source(), print_log(), print_new_results(), print_state(), reloc_targets_vfile_size(), run_rz_test(), rz_analysis_esil_get_instruction_trace(), rz_analysis_function_args(), rz_analysis_function_delete_vars_by_kind(), rz_analysis_function_get_arg_count(), rz_analysis_function_set_type(), rz_analysis_var_delete(), rz_bin_dex_classes(), rz_bin_dex_fields(), rz_bin_dex_imports(), rz_bin_dex_libraries(), rz_bin_dex_resolve_field_by_idx(), rz_bin_dex_resolve_method_by_idx(), rz_bin_dex_resolve_method_offset_by_idx(), rz_bin_dex_symbols(), rz_bin_pe_get_clr_symbols(), rz_bin_reloc_storage_new(), rz_cmd_dexe_handler(), rz_cmd_dexs_handler(), rz_core_analysis_type_match(), rz_core_disasm_pde(), rz_core_file_close(), rz_core_get_boundaries_prot(), rz_il_validate_global_context_new_from_vm(), rz_il_vm_add_mem(), rz_il_vm_get_mem(), rz_io_map_cleanup(), rz_io_map_del(), rz_io_map_del_for_fd(), rz_io_map_depriorize(), rz_io_map_priorize(), rz_io_map_priorize_for_fd(), rz_line_autocomplete(), rz_line_completion_push(), rz_pvector_empty(), rz_rows_cmp(), rz_table_add_row(), rz_table_add_row_vec(), rz_test_main(), rz_test_run_asm_test(), rz_type_func_args_count(), rz_type_func_args_name(), rz_type_func_args_type(), save_callable(), selection_widget_update(), type_match(), and vars_resolve_overlaps().
RZ_API RzPVector* rz_pvector_new | ( | RzPVectorFree | free | ) |
Definition at line 302 of file vector.c.
References free(), NULL, RZ_NEW, rz_pvector_init(), and v.
Referenced by analysis_class_print(), bin_pe_dotnet_init_metadata(), c_parser_new_callable(), c_parser_new_naked_callable(), capture_filter_keywords(), collect_nodes_at(), collect_nodes_in(), collect_nodes_intersect(), del(), get_patchable_relocs(), get_token_patterns(), parse_type_mfunction(), parse_type_procedure(), print_stats(), rz_analysis_esil_trace_new(), rz_analysis_function_all_opcode_stat_handler(), rz_analysis_function_args(), rz_analysis_il_trace_instruction_new(), rz_analysis_rzil_trace_new(), rz_analysis_var_set_access(), rz_annotated_code_annotations_in(), rz_annotated_code_annotations_range(), rz_bin_dex_new(), rz_bin_object_get_maps_at(), rz_cmd_debug_traces_esil_delete_handler(), rz_core_analysis_bytes(), rz_il_var_set_get_all(), rz_pvector_new_with_len(), rz_table_add_row(), rz_table_add_row_columnsf(), rz_table_add_rowf(), rz_table_columns(), rz_test_load_asm_test_file(), rz_test_load_cmd_test_file(), rz_test_load_json_test_file(), rz_test_main(), rz_tree_bfs(), rz_type_callable_clone(), and rz_type_callable_new().
RZ_API RzPVector* rz_pvector_new_with_len | ( | RzPVectorFree | free, |
size_t | length | ||
) |
Definition at line 311 of file vector.c.
References free(), length, memset(), NULL, p, rz_pvector_free(), rz_pvector_new(), rz_pvector_reserve(), and v.
Referenced by get_relocs().
Definition at line 372 of file vector.c.
References rz_vector_t::len, NULL, r, rz_pvector_at(), rz_return_val_if_fail, rz_vector_pop(), and rz_pvector_t::v.
Referenced by analysis_block_on_exit(), rz_analysis_block_recurse(), rz_analysis_block_recurse_followthrough(), rz_core_visual_cmd(), rz_test_run_asm_test(), substitute_args_fini(), and worker_th().
Definition at line 379 of file vector.c.
References NULL, r, rz_pvector_at(), rz_return_val_if_fail, rz_vector_pop_front(), and rz_pvector_t::v.
Referenced by rz_core_disasm_pde(), and rz_tree_bfs().
|
inlinestatic |
Definition at line 300 of file rz_vector.h.
References rz_vector_push(), rz_pvector_t::v, and x.
Referenced by __addRow(), __cons_pal_update_event(), add_map(), analysis_block_cb(), analysis_class_print(), block_recurse_successor_cb(), c_parser_new_callable_argument(), capture_filter_keywords(), cmd_desc_set_parent(), collect_nodes_cb(), core_file_do_load_for_debug(), core_file_do_load_for_io_plugin(), database_load(), database_load_fuzz_file(), del(), dex_parse(), ds_newline(), get_callable_type(), get_patchable_relocs(), get_token_patterns(), interact(), io_create_mem_map(), io_map_new(), map_multi_dex(), parse_line_header_source(), parse_type_arglist(), print_stats(), read_image_metadata_tilde_header(), recovery_analysis_complete_object_locator(), recovery_analysis_type_descriptor(), run_rz_test(), rz_analysis_block_recurse(), rz_analysis_block_recurse_followthrough(), rz_analysis_block_shortest_path(), rz_analysis_esil_trace_op(), rz_analysis_function_all_opcode_stat_handler(), rz_analysis_function_args(), rz_analysis_function_set_var(), rz_analysis_il_config_add_label(), rz_analysis_il_trace_add_mem(), rz_analysis_il_trace_add_reg(), rz_analysis_var_set_access(), rz_annotated_code_annotations_in(), rz_annotated_code_annotations_range(), rz_bin_object_get_maps_at(), rz_bin_object_sections_mapping_list(), rz_bin_reloc_storage_new(), rz_bin_source_line_info_builder_build_and_fini(), rz_core_analysis_bytes(), rz_core_recover_vars(), rz_il_vm_add_mem(), rz_io_cache_write(), rz_io_map_priorize(), rz_io_map_priorize_for_fd(), rz_line_completion_push(), rz_line_ns_completion_result_add(), rz_serialize_analysis_load(), rz_subprocess_start_opt(), rz_table_columns(), rz_table_transpose(), rz_test_load_asm_test_file(), rz_test_load_cmd_test_file(), rz_test_load_json_test_file(), rz_test_main(), rz_test_run_asm_test(), rz_tree_bfs(), rz_type_callable_arg_add(), rz_type_callable_clone(), rz_type_func_arg_add(), shortest_path_successor_cb(), source_file_collect_cb(), substitute_args_init(), vars_collect_cb(), and worker_th().
|
inlinestatic |
Definition at line 305 of file rz_vector.h.
References rz_vector_push_front(), rz_pvector_t::v, and x.
Referenced by rz_core_visual_cmd(), and rz_io_map_depriorize().
Definition at line 355 of file vector.c.
References NULL, r, rz_pvector_at(), rz_return_val_if_fail, rz_vector_remove_at(), and rz_pvector_t::v.
Referenced by rz_analysis_function_delete_vars_by_kind(), rz_analysis_var_delete(), rz_io_map_cleanup(), rz_io_map_del(), rz_io_map_del_for_fd(), rz_io_map_depriorize(), rz_io_map_priorize(), rz_io_map_priorize_for_fd(), and rz_test_main().
Definition at line 362 of file vector.c.
References rz_vector_t::a, NULL, rz_pvector_contains(), rz_vector_remove_at(), rz_pvector_t::v, and x.
Referenced by cmd_desc_unset_parent(), rz_analysis_function_delete_var(), rz_analysis_var_clear_accesses(), rz_analysis_var_remove_access_at(), rz_core_file_bin_file_deleted(), rz_core_file_io_desc_closed(), rz_core_file_io_map_deleted(), rz_io_cache_invalidate(), and rz_subprocess_free().
Definition at line 312 of file rz_vector.h.
References rz_vector_reserve(), and rz_pvector_t::v.
Referenced by dex_parse(), get_callable_type(), rz_analysis_function_args(), rz_bin_reloc_storage_new(), rz_bin_source_line_info_builder_build_and_fini(), rz_core_analysis_bytes(), rz_il_vm_add_mem(), rz_line_completion_set(), rz_pvector_new_with_len(), and rz_tree_bfs().
Definition at line 241 of file rz_vector.h.
References rz_vector_t::a, e, rz_return_if_fail, v, and rz_pvector_t::v.
Referenced by rz_analysis_function_args(), and rz_il_vm_add_mem().
|
inlinestatic |
RZ_API void rz_pvector_sort | ( | RzPVector * | vec, |
RzPVectorComparator | cmp | ||
) |
Definition at line 408 of file vector.c.
References rz_vector_t::a, cmp(), rz_vector_t::len, quick_sort(), rz_return_if_fail, and rz_pvector_t::v.
Referenced by __cons_pal_update_event(), cmd_desc_set_parent(), print_source_info(), rz_bin_reloc_storage_new(), rz_bin_source_line_info_builder_build_and_fini(), and sort_groups().
|
inlinestatic |
Definition at line 269 of file rz_vector.h.
References rz_vector_t::a, rz_vector_t::len, NULL, rz_return_val_if_fail, and rz_pvector_t::v.
Referenced by map_multi_dex(), and rz_table_tosimplestring().
Definition at line 114 of file vector.c.
References rz_vector_t::elem_size, memcpy(), p, and rz_return_if_fail.
Referenced by rz_vector_assign_at(), rz_vector_insert(), rz_vector_pop(), rz_vector_push(), and rz_vector_remove_at().
Definition at line 119 of file vector.c.
References p, rz_vector_assign(), and rz_vector_index_ptr().
Definition at line 68 of file vector.c.
References rz_vector_t::a, rz_vector_t::capacity, RZ_FREE, rz_return_if_fail, and vector_free_elems().
Referenced by add_seek_history(), nextword(), parse_enum(), parse_structure(), parse_union(), recovery_complete_object_locator_free(), rz_analysis_block_recurse_depth_first(), rz_analysis_var_clear_accesses(), rz_analysis_vtable_info_free(), rz_annotated_code_free(), rz_event_send(), rz_pvector_clear(), rz_skyline_clear(), and rz_vector_fini().
Definition at line 101 of file vector.c.
References free(), NULL, RZ_NEW, rz_return_val_if_fail, and vector_clone().
Referenced by clear_bb_vars(), fcn_takeover_block_recursive_followthrough_cb(), rz_analysis_function_delete_unused_vars(), rz_analysis_function_set_type(), rz_analysis_var_resolve_overlaps(), rz_asm_token_string_clone(), and rz_core_disasm_pde().
Definition at line 74 of file rz_vector.h.
References rz_vector_t::len, and rz_return_val_if_fail.
Referenced by add_seek_history(), fcn_takeover_block_recursive_followthrough_cb(), parse_enum_node(), rz_analysis_block_recurse_depth_first(), rz_analysis_function_delete_unused_vars(), rz_analysis_hint_get(), rz_analysis_run_tasks(), rz_core_seek_redo(), rz_core_seek_undo(), rz_core_types_enum_print(), rz_core_types_struct_print(), rz_core_types_union_print(), rz_id_pool_grab_id(), rz_serialize_analysis_global_var_save(), rz_serialize_analysis_var_save(), sparse_limits(), and var_add_structure_fields_to_list().
Definition at line 61 of file vector.c.
References rz_vector_t::free, rz_vector_t::free_user, NULL, rz_return_if_fail, and rz_vector_clear().
Referenced by analyze_function_locally(), backtrace_windows_x64(), buf_sparse_fini(), dmp_close(), init_module_runtime_functions(), note_segment_free(), parse_line_header_source(), parse_line_raw(), rz_analysis_fcn(), rz_analysis_get_delta_jmptbl_info(), rz_analysis_il_init_state_free(), rz_analysis_var_global_free(), rz_bflt_free(), rz_bin_elf_dt_dynamic_free(), rz_bin_elf_notes_new(), rz_bin_source_line_info_builder_build_and_fini(), rz_bin_source_line_info_builder_fini(), rz_core_analysis_stats_free(), rz_core_seek_free(), rz_core_seek_reset(), rz_core_visual_graph(), rz_debug_dmp_pids(), rz_event_free(), rz_il_reg_binding_derive(), rz_pvector_fini(), rz_pvector_free(), rz_skyline_fini(), rz_type_base_type_free(), rz_vector_free(), and var_free().
Turn the vector into a fixed-size array. This will clear the vector and return an array of its original contents whose ownership is transferred to the caller. This is useful when RzVector is used for its dynamically growing functionality as an intermediate step to generate a fixed-size array in the end.
Definition at line 230 of file vector.c.
References rz_vector_t::a, rz_vector_t::capacity, rz_vector_t::len, NULL, r, rz_return_val_if_fail, and rz_vector_shrink().
Referenced by parse_line_header_source(), parse_line_raw(), rz_bin_source_line_info_builder_build_and_fini(), rz_il_reg_binding_derive(), and rz_pvector_flush().
Definition at line 75 of file vector.c.
References free(), and rz_vector_fini().
Referenced by addr_hint_record_ht_free(), analysis_class_print(), analysis_class_print_as_cmd(), analysis_class_print_to_json(), convert_sections_from_shdr(), detect_constructor_destructor(), get_gnu_debugdata_elf_symbols(), get_sections_from_dt_dynamic(), get_segments_from_phdr(), ht_callback_free(), htup_vector_free(), init(), kv_array_free(), list_all_functions_at_vtable_offset(), rz_analysis_class_base_delete_class_cb(), rz_analysis_class_base_get_all(), rz_analysis_class_base_list_handler(), rz_analysis_class_base_rename_class_cb(), rz_analysis_class_base_set(), rz_analysis_class_get_inheritance_graph(), rz_analysis_class_method_exists_by_addr(), rz_analysis_class_method_get_all(), rz_analysis_class_method_get_by_addr(), rz_analysis_class_vtable_get_all(), rz_analysis_class_vtable_list_handler(), rz_analysis_class_vtable_set(), rz_asm_token_string_free(), rz_bin_elf_compute_symbols(), rz_bin_elf_convert_sections(), rz_bin_elf_free(), rz_bin_elf_notes_new(), rz_bin_elf_relocs_new(), rz_bin_elf_sections_new(), rz_core_bin_sections_mapping_print(), rz_debug_session_free(), rz_id_pool_free(), rz_id_pool_grab_id(), rz_table_columns(), rz_table_filter_columns(), and rz_table_free().
|
inlinestatic |
Definition at line 94 of file rz_vector.h.
References rz_vector_t::a, NULL, and rz_return_val_if_fail.
Definition at line 88 of file rz_vector.h.
References rz_vector_t::a, rz_vector_t::elem_size, NULL, and rz_return_val_if_fail.
Referenced by __addRow(), __computeTotal(), __table_adjust(), _get_checkpoint_before(), _restore_memory_cb(), _set_register(), add_seek_history(), analBars(), backtrace_windows_x64(), buf_sparse_read(), buf_sparse_resize(), cmd_print_bars(), cmd_print_blocks(), get_number_of_segments(), init_shstrtab_aux(), nextword(), on_map_skyline(), restore_memory_cb(), restore_register(), rz_analysis_block_recurse_depth_first(), rz_analysis_function_get_var_reg_at(), rz_analysis_function_get_var_stackptr_at(), rz_analysis_var_get_access_at(), rz_analysis_var_get_constraints_readable(), rz_analysis_var_global_get_constraints_readable(), rz_analysis_var_remove_access_at(), rz_analysis_var_set_access(), rz_bin_elf_get_section(), rz_buf_sparse_get_chunks(), rz_buf_sparse_populated_in(), rz_core_annotated_code_print(), rz_core_get_boundaries_prot(), rz_core_seek_peek(), rz_rows_cmp(), rz_skyline_add(), rz_skyline_get_item_intersect(), rz_table_align(), rz_table_columns(), rz_table_filter(), rz_table_filter_columns(), rz_table_group(), rz_table_sort(), rz_table_sortlen(), rz_table_tocsv(), rz_table_tofancystring(), rz_table_tojson(), rz_table_tosimplestring(), rz_table_transpose(), rz_vector_assign_at(), rz_vector_insert(), rz_vector_insert_range(), rz_vector_pop(), rz_vector_push(), rz_vector_remove_at(), rz_vector_remove_range(), sparse_limits(), sparse_write(), unset_addr_hint_record(), and vector_free_elems().
RZ_API void rz_vector_init | ( | RzVector * | vec, |
size_t | elem_size, | ||
RzVectorFree | free, | ||
void * | free_user | ||
) |
Definition at line 33 of file vector.c.
References rz_vector_t::a, rz_vector_t::capacity, rz_vector_t::elem_size, rz_vector_t::free, free(), rz_vector_t::free_user, rz_vector_t::len, NULL, and rz_return_if_fail.
Referenced by agraph_init(), analyze_function_locally(), backtrace_windows_x64(), buf_sparse_init(), dmp_open(), global_var_load_cb(), init_module_runtime_functions(), parse_line_header_source(), parse_line_raw(), recovery_complete_object_locator_new(), rz_analysis_block_recurse_depth_first(), rz_analysis_fcn(), rz_analysis_function_set_var(), rz_analysis_get_delta_jmptbl_info(), rz_analysis_il_init_state_new(), rz_analysis_vtable_parse_at(), rz_annotated_code_new(), rz_bflt_init(), rz_bin_elf_dt_dynamic_new(), rz_bin_elf_notes_new(), rz_bin_source_line_info_builder_init(), rz_core_analysis_get_stats(), rz_core_seek_reset(), rz_debug_dmp_pids(), rz_event_new(), rz_il_reg_binding_derive(), rz_pvector_init(), rz_serialize_analysis_var_load(), rz_skyline_init(), rz_type_base_type_new(), and rz_vector_new().
Definition at line 151 of file vector.c.
References rz_vector_t::capacity, rz_vector_t::elem_size, len, rz_vector_t::len, NEXT_VECTOR_CAPACITY, NULL, p, RESIZE_OR_RETURN_NULL, rz_return_val_if_fail, rz_vector_assign(), rz_vector_index_ptr(), and x.
Referenced by rz_analysis_var_set_access(), rz_pvector_insert(), rz_skyline_add(), rz_vector_push_front(), and sparse_write().
Definition at line 167 of file vector.c.
References rz_vector_t::capacity, count, rz_vector_t::elem_size, len, rz_vector_t::len, memcpy(), NEXT_VECTOR_CAPACITY, NULL, p, RESIZE_OR_RETURN_NULL, RZ_MAX, rz_return_val_if_fail, and rz_vector_index_ptr().
Referenced by rz_core_analysis_get_stats(), and rz_pvector_insert_range().
Definition at line 82 of file rz_vector.h.
References rz_vector_t::len, and rz_return_val_if_fail.
Referenced by add_seek_history(), analBars(), analysis_class_print(), backtrace_windows_x64(), buf_sparse_read(), buf_sparse_resize(), check_token_coverage(), cmd_print_bars(), cmd_print_blocks(), get_sections_from_dt_dynamic(), get_segments_from_phdr(), on_map_skyline(), parse_line_header_source(), parse_line_raw(), rz_bin_elf_compute_symbols(), rz_bin_elf_convert_sections(), rz_bin_elf_get_relocs_count(), rz_bin_elf_get_section(), rz_bin_elf_notes_new(), rz_bin_elf_relocs_new(), rz_bin_source_line_info_builder_build_and_fini(), rz_buf_sparse_get_chunks(), rz_core_analysis_stats_get_block_to(), rz_core_get_boundaries_prot(), rz_core_seek_list(), rz_core_seek_peek(), rz_il_reg_binding_derive(), rz_rows_cmp(), rz_skyline_add(), rz_skyline_get_item_intersect(), rz_table_columns(), rz_table_filter(), rz_table_group(), rz_table_tofancystring(), rz_table_transpose(), sparse_limits(), and type_as_pretty_string().
RZ_API RzVector* rz_vector_new | ( | size_t | elem_size, |
RzVectorFree | free, | ||
void * | free_user | ||
) |
Definition at line 42 of file vector.c.
References free(), NULL, RZ_NEW, and rz_vector_init().
Referenced by add_mem_change(), add_reg_change(), array_add(), convert_sections_from_shdr(), deserialize_memory_cb(), deserialize_registers_cb(), ensure_addr_hint_record(), get_cbs(), get_sections_from_dt_dynamic(), get_segments_from_phdr(), rz_analysis_class_base_get_all(), rz_analysis_class_method_get_all(), rz_analysis_class_vtable_get_all(), rz_annotated_code_line_offsets(), rz_asm_token_string_new(), rz_bin_elf_compute_symbols(), rz_bin_elf_notes_new(), rz_bin_elf_relocs_new(), rz_bin_elf_sections_new(), rz_bin_object_p2v_all(), rz_bin_object_sections_mapping_list(), rz_debug_session_add_mem_change(), rz_debug_session_add_reg_change(), rz_debug_session_new(), rz_id_pool_kick_id(), rz_table_columns(), rz_table_filter_columns(), and rz_table_new().
Definition at line 184 of file vector.c.
References rz_vector_t::len, rz_return_if_fail, rz_vector_assign(), and rz_vector_index_ptr().
Referenced by rz_analysis_block_recurse_depth_first(), rz_analysis_run_tasks(), rz_core_seek_redo(), rz_core_seek_undo(), and rz_pvector_pop().
Definition at line 192 of file vector.c.
References rz_return_if_fail, and rz_vector_remove_at().
Referenced by rz_id_pool_grab_id(), and rz_pvector_pop_front().
Definition at line 197 of file vector.c.
References rz_vector_t::capacity, rz_vector_t::len, NEXT_VECTOR_CAPACITY, NULL, p, RESIZE_OR_RETURN_NULL, rz_return_val_if_fail, rz_vector_assign(), rz_vector_index_ptr(), and x.
Referenced by add_dt_dynamic_entry(), add_mem_change(), add_reg_change(), add_seek_history(), add_token(), analyze_function_locally(), array_add(), bflt_load_relocs(), compute_symbols_from_segment(), convert_sections_from_shdr(), create_section_from_phdr(), deserialize_checkpoints_cb(), deserialize_memory_cb(), deserialize_registers_cb(), ensure_addr_hint_record(), get_enum_type(), get_gnu_debugdata_elf_symbols(), get_relocs_entry(), get_segments_from_phdr(), get_struct_type(), get_union_type(), global_var_load_cb(), init_module_runtime_functions(), nextword(), parse_enum(), parse_enum_node(), parse_enum_type(), parse_line_header_source(), parse_note_file(), parse_note_prstatus(), parse_opcodes(), parse_struct_node(), parse_structure(), parse_structure_type(), parse_union(), parse_union_node(), recovery_analysis_complete_object_locator(), rz_analysis_block_recurse_depth_first(), rz_analysis_class_base_get_all(), rz_analysis_class_method_get_all(), rz_analysis_class_vtable_get_all(), rz_analysis_get_delta_jmptbl_info(), rz_analysis_il_init_state_set_var(), rz_analysis_task_item_new(), rz_analysis_var_add_constraint(), rz_analysis_var_global_add_constraint(), rz_analysis_vtable_parse_at(), rz_annotated_code_add_annotation(), rz_annotated_code_line_offsets(), rz_bin_elf_notes_new(), rz_bin_elf_sections_new(), rz_bin_object_p2v_all(), rz_bin_object_sections_mapping_list(), rz_bin_source_line_info_builder_push_sample(), rz_core_seek_redo(), rz_core_seek_undo(), rz_debug_add_checkpoint(), rz_debug_dmp_init(), rz_debug_dmp_pids(), rz_debug_session_add_mem_change(), rz_debug_session_add_reg_change(), rz_event_hook(), rz_event_unhook(), rz_id_pool_kick_id(), rz_il_reg_binding_derive(), rz_pvector_push(), rz_serialize_analysis_var_load(), rz_table_add_column(), rz_table_add_row(), rz_table_add_row_vec(), and rz_table_columns().
Definition at line 209 of file vector.c.
References NULL, rz_return_val_if_fail, rz_vector_insert(), and x.
Referenced by rz_pvector_push_front().
Definition at line 127 of file vector.c.
References rz_vector_t::elem_size, len, rz_vector_t::len, p, rz_return_if_fail, rz_vector_assign(), and rz_vector_index_ptr().
Referenced by add_seek_history(), del_hook(), rz_analysis_var_remove_access_at(), rz_pvector_remove_at(), rz_pvector_remove_data(), rz_skyline_add(), rz_table_filter(), rz_table_group(), rz_vector_pop_front(), and unset_addr_hint_record().
remove all elements in the given range and write the contents to into (must be appropriately large). It is the caller's responsibility to free potential resources associated with the elements.
Definition at line 139 of file vector.c.
References count, rz_vector_t::elem_size, len, rz_vector_t::len, memcpy(), p, rz_return_if_fail, and rz_vector_index_ptr().
Referenced by buf_sparse_resize(), and sparse_write().
Definition at line 214 of file vector.c.
References rz_vector_t::a, rz_vector_t::capacity, NULL, RESIZE_OR_RETURN_NULL, and rz_return_val_if_fail.
Referenced by c_parser_new_enum_type(), c_parser_new_structure_type(), c_parser_new_union_type(), get_enum_type(), get_struct_type(), get_union_type(), init_module_runtime_functions(), recovery_analysis_complete_object_locator(), rz_analysis_class_base_get_all(), rz_analysis_class_method_get_all(), rz_analysis_class_vtable_get_all(), rz_bin_object_sections_mapping_list(), rz_id_pool_kick_id(), and rz_pvector_reserve().
Definition at line 222 of file vector.c.
References rz_vector_t::a, rz_vector_t::capacity, rz_vector_t::len, NULL, RESIZE_OR_RETURN_NULL, and rz_return_val_if_fail.
Referenced by rz_pvector_shrink(), and rz_vector_flush().
RZ_API void rz_vector_sort | ( | RzVector * | vec, |
RzVectorComparator | cmp, | ||
bool | reverse | ||
) |
Sort function for RzVector.
vec | pointer to RzVector |
cmp | function used for comparing elements while sorting |
reverse | sort order, ascending order when reverse = False |
Definition at line 285 of file vector.c.
References rz_vector_t::a, cmp(), rz_vector_t::elem_size, rz_vector_t::len, make_dist_html::reverse, rz_return_if_fail, and vector_quick_sort().
Referenced by rz_asm_tokenize_asm_regex(), rz_table_sort(), and rz_table_sortlen().
|
inlinestatic |
Definition at line 100 of file rz_vector.h.
References rz_vector_t::a, rz_vector_t::elem_size, rz_vector_t::len, NULL, and rz_return_val_if_fail.
Referenced by parse_enum_node(), rz_table_add_row_columnsf(), and rz_table_tosimplestring().