Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Functions | |
RZ_API RzReg * | rz_core_reg_default (RzCore *core) |
Get the currently relevant RzReg. More... | |
RZ_API ut64 | rz_core_reg_getv_by_role_or_name (RzCore *core, const char *name) |
rz_reg_getv_by_role_or_name() on rz_core_reg_default() More... | |
RZ_API bool | rz_core_reg_set_by_role_or_name (RzCore *core, const char *name, ut64 num) |
set on rz_core_reg_default() More... | |
RZ_IPI RzList * | rz_core_reg_flags_candidates (RzCore *core, RzReg *reg) |
static void | regs_to_flags (RzCore *core, RzReg *regs) |
RZ_API void | rz_core_reg_update_flags (RzCore *core) |
Update or create flags for all registers where it makes sense. More... | |
RZ_IPI void | rz_core_reg_print_diff (RzReg *reg, RzList *items) |
Print registers that have changed since the last step (drd/ard) More... | |
Definition at line 82 of file creg.c.
References rz_core_t::flags, reg, regs, rz_core_reg_flags_candidates(), rz_flag_set(), RZ_FLAGS_FS_REGISTERS, rz_list_free(), rz_reg_get_value(), rz_return_if_fail, and ut64().
Referenced by rz_core_reg_update_flags().
Get the currently relevant RzReg.
Depending on whether or not the core is in debug mode, this returns the RzReg from debug or analysis (emulation). Before using this function, think twice whether it would not make more sense to use core->dbg->reg or analysis->dbg->reg directly, depending on what you want to do with it.
Definition at line 17 of file creg.c.
References rz_core_t::analysis, rz_core_t::dbg, rz_analysis_t::reg, rz_debug_t::reg, and rz_core_is_debug().
Referenced by autocmplt_reg(), cmd_print_format(), DEFINE_HANDLE_TS_FCN_AND_SYMBOL(), foreach_reg_set_or_clear(), num_callback(), rz_core_arg_get(), rz_core_cmd_foreach3(), rz_core_debug_print_status(), rz_core_print_disasm(), and rz_core_reg_update_flags().
Construct the list of registers that should be applied as flags by default (e.g. because their size matches the pointer size)
Definition at line 60 of file creg.c.
References rz_core_t::analysis, NULL, pc, reg, rz_analysis_get_address_bits(), rz_list_new(), rz_list_push(), rz_reg_get_by_role(), rz_reg_get_list(), RZ_REG_NAME_PC, RZ_REG_TYPE_GPR, and rz_reg_item_t::size.
Referenced by regs_to_flags(), and rz_reg_flags_handler().
rz_reg_getv_by_role_or_name() on rz_core_reg_default()
Definition at line 24 of file creg.c.
References rz_core_t::analysis, rz_core_t::dbg, rz_analysis_t::reg, rz_core_is_debug(), rz_debug_reg_get(), and rz_reg_getv_by_role_or_name().
Referenced by num_callback(), rz_core_arg_get(), rz_core_seek_to_register(), and rz_core_syscall_as_string().
Print registers that have changed since the last step (drd/ard)
Definition at line 116 of file creg.c.
References delta, rz_reg_item_t::name, PFMT64x, reg, rz_cons_printf(), rz_reg_arena_swap(), rz_reg_get_value(), and ut64().
Referenced by rz_core_debug_print_status(), and rz_regs_diff_handler().
set on rz_core_reg_default()
This also makes sure that, in debug mode, registers are synced, and updates flags if there are any.
Definition at line 39 of file creg.c.
References rz_core_t::analysis, rz_core_t::dbg, rz_core_t::flags, num, rz_analysis_t::reg, rz_core_is_debug(), rz_core_reg_update_flags(), rz_debug_reg_set(), RZ_FLAGS_FS_REGISTERS, rz_reg_get_by_role_or_name(), rz_reg_set_value(), rz_spaces_get(), and rz_flag_t::spaces.
Referenced by __handle_cursor_mode(), __handle_menu(), __panels_process(), rz_core_arg_set(), rz_core_visual_cmd(), and rz_core_visual_graph().
Update or create flags for all registers where it makes sense.
Registers are taken either from rz_core_reg_default(). "makes sens" currently means regs that have the same size as an address, but this may change in case a better heuristic is found.
Definition at line 106 of file creg.c.
References rz_core_t::dbg, regs_to_flags(), rz_core_is_debug(), rz_core_reg_default(), rz_debug_reg_sync(), and RZ_REG_TYPE_GPR.
Referenced by __print_disassembly_cb(), rz_analysis_appcall_handler(), rz_analysis_continue_until_addr_handler(), rz_analysis_continue_until_breakpoint_handler(), rz_analysis_continue_until_esil_handler(), rz_analysis_continue_until_except_handler(), rz_cmd_debug_step_cond_handler(), rz_cmd_debug_step_prog_handler(), rz_core_analysis_continue_until_call(), rz_core_analysis_continue_until_syscall(), rz_core_analysis_esil_init_mem(), rz_core_analysis_esil_step_over(), rz_core_analysis_esil_step_over_until(), rz_core_analysis_esil_step_over_untilexpr(), rz_core_analysis_il_reinit(), rz_core_analysis_set_reg(), rz_core_cmd_subst(), rz_core_debug_continue(), rz_core_debug_continue_until(), rz_core_debug_single_step_in(), rz_core_debug_single_step_over(), rz_core_debug_step_back(), rz_core_debug_step_one(), rz_core_debug_step_over(), rz_core_debug_step_skip(), rz_core_debug_step_until_frame(), rz_core_esil_continue_back(), rz_core_esil_step_back(), rz_core_file_reopen(), rz_core_il_step(), rz_core_link_stroff(), rz_core_reg_set_by_role_or_name(), rz_core_setup_debugger(), rz_core_visual(), rz_core_visual_prompt(), rz_il_step_back_handler(), rz_il_step_handler(), rz_il_step_until_addr_handler(), rz_il_step_until_expr_handler(), rz_il_step_until_opt_handler(), step_line(), step_until(), step_until_esil(), step_until_flag(), step_until_inst(), and step_until_optype().