Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Variables | |
static const char * | types [RZ_REG_TYPE_LAST+1] |
static const char * | roles [RZ_REG_NAME_LAST+1] |
|
static |
Definition at line 461 of file reg.c.
References rz_interval_node_t::data, rz_reg_item_t::offset, and rz_reg_item_t::size.
Referenced by rz_reg_filter_items_covered().
RZ_LIB_VERSION | ( | rz_reg | ) |
Definition at line 17 of file reg.c.
References i, rz_reg_item_t::name, NULL, rz_reg_item_t::offset, reg, RZ_REG_TYPE_LAST, rz_str_casecmp(), and rz_reg_item_t::size.
Referenced by anop_esil(), get_regname(), and get_src_regname().
Definition at line 44 of file reg.c.
References i, rz_reg_item_t::name, NULL, rz_reg_item_t::offset, reg, RZ_REG_TYPE_LAST, rz_str_casecmp(), and rz_reg_item_t::size.
Referenced by do_syscall_search().
Filter out all register items that are smaller than but covered entirely by some other register.
regs | list of RzRegItem |
Definition at line 489 of file reg.c.
References foreach_reg_cb(), NULL, rz_reg_item_t::offset, regs, rz_interval_tree_all_in(), rz_interval_tree_fini(), rz_interval_tree_init(), rz_interval_tree_insert(), rz_list_new(), rz_list_push(), rz_return_val_if_fail, and rz_reg_item_t::size.
Referenced by filter_reg_items(), rz_core_debug_print_status(), and rz_il_reg_binding_derive().
Definition at line 279 of file reg.c.
References free(), reg, and rz_reg_free_internal().
Referenced by rz_analysis_free(), rz_debug_free(), and setup_regs().
Definition at line 191 of file reg.c.
References i, init, NULL, reg, RZ_FREE, rz_list_delete_data(), rz_list_free(), rz_list_newf(), rz_reg_arena_free(), rz_reg_item_free(), RZ_REG_NAME_LAST, RZ_REG_TYPE_LAST, and rz_return_if_fail.
Referenced by rz_reg_free(), and rz_reg_set_profile_string().
Definition at line 344 of file reg.c.
References e, found, i, NULL, reg, rz_reg_get_name(), rz_reg_get_name_idx(), RZ_REG_TYPE_FLG, RZ_REG_TYPE_GPR, RZ_REG_TYPE_LAST, rz_return_val_if_fail, and type.
Referenced by agraph_refresh(), analysis_fill_ai_rg(), analysis_fill_r0_reg_ref(), analysis_regrel_jump(), anop_esil(), backtrace_fuzzy(), backtrace_x86_32(), backtrace_x86_32_analysis(), backtrace_x86_64(), backtrace_x86_64_analysis(), cmd_print_format(), cs_reg2reg(), esil_6502_init(), esil_bigger(), esil_bigger_equal(), esil_cmp(), esil_gb_init(), esil_internal_sizeof_reg(), esil_smaller(), esil_smaller_equal(), filter_reg_items(), gb_analysis_add_hl(), gb_analysis_add_sp(), gb_analysis_and_bit(), gb_analysis_and_res(), gb_analysis_cb_rl(), gb_analysis_cb_rlc(), gb_analysis_cb_rr(), gb_analysis_cb_rrc(), gb_analysis_cb_sla(), gb_analysis_cb_sra(), gb_analysis_cb_srl(), gb_analysis_cb_swap(), gb_analysis_cond(), gb_analysis_id(), gb_analysis_jmp_hl(), gb_analysis_load(), gb_analysis_load_hl(), gb_analysis_mov_hl_sp(), gb_analysis_mov_ime(), gb_analysis_mov_imm(), gb_analysis_mov_reg(), gb_analysis_mov_scf(), gb_analysis_mov_sp_hl(), gb_analysis_or_set(), gb_analysis_pp(), gb_analysis_store(), gb_analysis_store_hl(), gb_analysis_xoaasc(), gb_analysis_xoaasc_imm(), gb_analysis_xor_ccf(), gb_analysis_xor_cpl(), get_regname(), get_src_regname(), getFunctionNamePrefix(), i8051_reg_read(), i8051_reg_write(), internal_esil_reg_read(), internal_esil_reg_write(), internal_esil_reg_write_no_null(), ispackedreg(), mips_op(), num_callback(), parse_reg64_name(), parse_reg_name(), pic_midrange_reg_write(), retype_callee_arg(), riscv_op(), rsp_op(), run_basic_block_analysis(), rz_analysis_dwarf_integrate_functions(), rz_analysis_esil_get_parm_type(), rz_analysis_esil_trace_op(), rz_analysis_extract_rarg(), rz_analysis_function_rebase_vars(), rz_analysis_function_vars_regs_getref_handler(), rz_analysis_function_vars_regs_handler(), rz_analysis_function_vars_regs_setref_handler(), rz_analysis_get_delta_jmptbl_info(), rz_analysis_get_jmptbl_info(), rz_analysis_var_get_argnum(), rz_core_analysis_set_reg(), rz_core_analysis_type_match(), rz_core_disasm_pde(), rz_core_esil_continue_back(), rz_core_link_stroff(), rz_core_reg_assign_sync(), rz_core_rtr_gdb_cb(), rz_debug_add_checkpoint(), rz_debug_continue_back(), rz_debug_continue_kill(), rz_debug_execute(), rz_debug_gdb_reg_write(), rz_debug_qnx_reg_write(), rz_debug_wait(), rz_il_reg_binding_exactly(), rz_il_vm_sync_from_reg(), rz_il_vm_sync_to_reg(), rz_main_rizin(), rz_reg_get_by_role(), rz_reg_get_by_role_or_name(), rz_reg_get_value_by_role(), rz_reg_getv(), rz_reg_set_profile_string(), rz_reg_set_value_by_role(), rz_reg_setv(), rz_regs_args_handler(), rz_regs_fpu_handler(), set_retval(), trace_hook_reg_write(), value_fill_addr_reg_disp(), and value_fill_addr_reg_regdelta().
Definition at line 414 of file reg.c.
References BITS2BYTES, delta, list(), NULL, rz_reg_item_t::offset, reg, rz_reg_get_list(), rz_return_val_if_fail, rz_reg_item_t::size, and type.
RZ_API RzRegItem* rz_reg_get_by_role | ( | RzReg * | reg, |
RzRegisterId | role | ||
) |
Definition at line 154 of file reg.c.
References NULL, reg, rz_reg_get(), rz_reg_get_name(), RZ_REG_TYPE_ANY, and rz_return_val_if_fail.
Referenced by rz_core_reg_flags_candidates(), rz_debug_continue_syscalls(), and rz_reg_get_by_role_or_name().
Definition at line 378 of file reg.c.
References r, reg, rz_reg_get(), rz_reg_get_by_role(), rz_reg_get_name_idx(), and RZ_REG_TYPE_ANY.
Referenced by rz_core_reg_set_by_role_or_name(), rz_debug_num_callback(), rz_debug_reg_set(), and rz_reg_getv_by_role_or_name().
Definition at line 389 of file reg.c.
References i, int, mask, NULL, reg, regs, rz_list_length(), RZ_REG_TYPE_ANY, RZ_REG_TYPE_LAST, and type.
Referenced by autocmplt_reg(), DEFINE_HANDLE_TS_FCN_AND_SYMBOL(), fillRegisterValues(), filter(), foreach_reg_set_or_clear(), rop_classify_arithmetic(), rop_classify_arithmetic_const(), rop_classify_constant(), rop_classify_mov(), rz_core_cmd_foreach3(), rz_core_debug_ri(), rz_core_reg_flags_candidates(), and rz_reg_get_at().
Definition at line 147 of file reg.c.
References NULL, reg, and RZ_REG_NAME_LAST.
Referenced by __init_panel_param(), __panels_check_stackbase(), __replaceRegisters(), agraph_refresh(), analysis_emul_init(), asciiart_backtrace(), backtrace_fuzzy(), backtrace_vars(), backtrace_windows(), do_syscall_search(), ds_print_esil_analysis(), ds_print_esil_analysis_fini(), ds_print_esil_analysis_init(), extract_arg(), filter_reg_items(), get_reg_role_name(), getpcfromstack(), internal_esil_reg_write_no_null(), linux_handle_signals(), list_vars(), num_callback(), prepend_current_pc(), rz_analysis_extract_vars(), rz_analysis_function_get_json(), rz_analysis_function_vars_handler(), rz_analysis_var_addr(), rz_core_analysis_continue_until_call(), rz_core_analysis_continue_until_syscall(), rz_core_analysis_esil(), rz_core_analysis_esil_emulate(), rz_core_analysis_esil_step_over(), rz_core_analysis_set_reg(), rz_core_analysis_type_match(), rz_core_esil_step(), rz_core_get_func_args(), rz_core_link_stroff(), rz_core_print_disasm(), rz_core_print_func_args(), rz_core_syscall_as_string(), rz_debug_gdb_reg_write(), rz_debug_qnx_reg_write(), rz_debug_step_soft(), rz_il_reg_binding_derive(), rz_il_vm_sync_from_reg(), rz_il_vm_sync_to_reg(), rz_reg_get(), rz_reg_get_by_role(), rz_reg_get_name_by_type(), rz_reg_get_value_by_role(), rz_reg_set_value_by_role(), rz_regs_args_handler(), and type_pos_hit().
Definition at line 72 of file reg.c.
References n, NULL, reg, rz_reg_get_name(), and rz_reg_get_name_idx().
Referenced by rz_reg_profile_to_cc().
Definition at line 102 of file reg.c.
References RZ_REG_NAME_A0, RZ_REG_NAME_A1, RZ_REG_NAME_A2, RZ_REG_NAME_A3, RZ_REG_NAME_A4, RZ_REG_NAME_A5, RZ_REG_NAME_A6, RZ_REG_NAME_A7, RZ_REG_NAME_A8, RZ_REG_NAME_A9, RZ_REG_NAME_BP, RZ_REG_NAME_CF, RZ_REG_NAME_LR, RZ_REG_NAME_OF, RZ_REG_NAME_PC, RZ_REG_NAME_R0, RZ_REG_NAME_R1, RZ_REG_NAME_R2, RZ_REG_NAME_R3, RZ_REG_NAME_SF, RZ_REG_NAME_SN, RZ_REG_NAME_SP, RZ_REG_NAME_SR, RZ_REG_NAME_ZF, rz_return_val_if_fail, and type.
Referenced by num_callback(), parse_alias(), rz_analysis_function_get_json(), rz_core_analysis_set_reg(), rz_reg_get(), rz_reg_get_by_role_or_name(), and rz_reg_get_name_by_type().
Definition at line 172 of file reg.c.
References NULL, roles, and RZ_REG_NAME_LAST.
Referenced by __replaceRegisters(), autocmplt_cmd_arg_reg_filter(), get_reg_role_name(), rz_reg_profile_handler(), and rz_reg_roles_handler().
Definition at line 68 of file reg.c.
References setup::idx, NULL, RZ_REG_TYPE_LAST, and types.
Referenced by autocmplt_cmd_arg_reg_filter(), autocmplt_cmd_arg_reg_type(), isFlag(), rz_reg_arenas_handler(), rz_reg_profile_handler(), rz_reg_types_handler(), and show_regs_handler().
Definition at line 332 of file reg.c.
References reg, rz_reg_get(), rz_reg_get_value(), rz_return_val_if_fail, and UT64_MAX.
Referenced by __init_panel_param(), __panels_check_stackbase(), analysis_emul_init(), asciiart_backtrace(), backtrace_vars(), backtrace_windows(), cmd_analysis_esil(), DEFINE_HANDLE_TS_FCN_AND_SYMBOL(), ds_init(), ds_print_esil_analysis(), ds_print_esil_analysis_init(), esilbreak_reg_write(), get_bb_body(), handle_var_stack_access(), loadGP(), pr_bb(), prepend_current_pc(), rz_analysis_appcall_handler(), rz_analysis_var_addr(), rz_core_analysis_address(), rz_core_analysis_esil(), rz_core_analysis_esil_emulate(), rz_core_analysis_esil_step_over(), rz_core_analysis_type_match(), rz_core_cmd_foreach3(), rz_core_esil_step(), rz_core_get_func_args(), rz_core_link_stroff(), rz_core_print_disasm(), rz_core_print_func_args(), rz_core_rtr_gdb_cb(), step_until_optype(), and type_pos_hit().
Definition at line 338 of file reg.c.
References reg, rz_reg_get_by_role_or_name(), rz_reg_get_value(), rz_return_val_if_fail, and UT64_MAX.
Referenced by backtrace_generic(), rz_core_reg_getv_by_role_or_name(), and rz_debug_reg_get().
Definition at line 262 of file reg.c.
References setup::idx, NULL, r, reg, and rz_reg_reindex().
Referenced by core_analysis_var_list_show(), ds_show_functions(), rz_analysis_function_set_var(), rz_core_analysis_type_match(), rz_core_analysis_var_display(), and var_variables_show().
Definition at line 311 of file reg.c.
References name, rz_reg_item_t::name, and reg.
Referenced by rz_reg_set_value().
Definition at line 96 of file reg.c.
References rz_reg_item_t::flags, free(), and rz_reg_item_t::name.
Referenced by add_item_to_regset(), rz_reg_free_internal(), and rz_reg_new().
Definition at line 286 of file reg.c.
References free(), i, NULL, reg, rz_list_newf(), rz_list_push(), RZ_NEW0, rz_reg_arena_free(), rz_reg_arena_new(), rz_reg_arena_push(), rz_reg_item_free(), and RZ_REG_TYPE_LAST.
Referenced by rz_analysis_new(), rz_debug_new(), and setup_regs().
RZ_API RzRegItem* rz_reg_next_diff | ( | RzReg * | reg, |
int | type, | ||
const ut8 * | buf, | ||
int | buflen, | ||
RzRegItem * | prev_ri, | ||
int | regsize | ||
) |
Definition at line 430 of file reg.c.
References rz_reg_arena_t::bytes, list(), NULL, rz_reg_item_t::offset, reg, RZ_REG_TYPE_LAST, rz_return_val_if_fail, rz_reg_item_t::size, and type.
Referenced by rz_debug_gdb_reg_write(), and rz_debug_qnx_reg_write().
Definition at line 452 of file reg.c.
References NULL, r, rs, RZ_REG_TYPE_LAST, rz_return_val_if_fail, and type.
Referenced by ds_print_esil_analysis_fini(), ds_print_esil_analysis_init(), rz_core_analysis_address(), rz_reg_arena_dup(), rz_reg_arena_peek(), and rz_reg_arena_poke().
Definition at line 243 of file reg.c.
References test_group_name::all, i, NULL, r, reg, regcmp(), rz_list_append(), rz_list_free(), rz_list_newf(), rz_list_sort(), and RZ_REG_TYPE_LAST.
Referenced by rz_reg_index_get(), and rz_reg_set_profile_string().
RZ_API int rz_reg_role_by_name | ( | RZ_NONNULL const char * | str | ) |
Get the RzRegisterId with the given name or -1.
Definition at line 180 of file reg.c.
References i, roles, RZ_REG_NAME_LAST, rz_return_val_if_fail, and cmd_descs_generate::str.
Referenced by filter_reg_items().
RZ_API bool rz_reg_set_name | ( | RZ_NONNULL RzReg * | reg, |
RzRegisterId | role, | ||
RZ_NONNULL const char * | name | ||
) |
Definition at line 138 of file reg.c.
References reg, RZ_REG_NAME_LAST, rz_return_val_if_fail, and rz_str_dup().
Referenced by rz_reg_set_reg_profile().
Definition at line 326 of file reg.c.
References reg, rz_reg_get(), rz_reg_set_value(), rz_return_val_if_fail, UT64_MAX, and val.
Referenced by backtrace_vars(), cmd_analysis_esil(), ds_print_esil_analysis(), ds_print_esil_analysis_fini(), ds_print_esil_analysis_init(), mipsTweak(), rz_analysis_appcall_handler(), rz_core_analysis_esil(), rz_core_analysis_esil_emulate(), rz_core_debug_step_skip(), and rz_core_esil_step().
Returns the register type for the given type abbreviation.
str | The type abbreviation (gpr, flg, sys etc.) |
Definition at line 83 of file reg.c.
References i, RZ_REG_TYPE_ANY, RZ_REG_TYPE_LAST, rz_return_val_if_fail, cmd_descs_generate::str, and types.
Referenced by expect_reg_type_by_name(), filter_reg_items(), rz_reg_arenas_hexdump_handler(), rz_reg_arenas_write_hex_handler(), and rz_reg_arenas_zero_handler().
|
static |
Definition at line 163 of file reg.c.
Referenced by rz_reg_get_role(), and rz_reg_role_by_name().
|
static |
Definition at line 10 of file reg.c.
Referenced by rz_reg_get_type(), and rz_reg_type_by_name().