42 for (
i = 0;
i < numinstr;
i++) {
45 prev_addr =
addr - mininstrsize;
53 if (
op.size < mininstrsize) {
54 op.size = mininstrsize;
95 if (
input[0] ==
'?') {
99 if (!strcmp(
input,
"-")) {
137 rz_core_cmdf(core,
"sd 1@e:cfg.seek.silent=true; /%s; sd -1@e:cfg.seek.silent=true; s %s%d_0; f- %s%d_0",
138 input, pfx, kwidx, pfx, kwidx);
147 eprintf(
"unknown search method\n");
167 if ((ptr = strstr(
argv[1],
"+.")) !=
NULL) {
189 int n = argc > 1 ? atoi(
argv[1]) : 0;
235 bool current_met =
false;
236 rz_list_foreach (
list,
iter, undo) {
241 if (
f->offset != undo->
offset) {
248 switch (
state->mode) {
262 comment =
" # current seek";
263 }
else if (current_met) {
271 }
else if (current_met) {
RZ_API ut64 rz_analysis_function_max_addr(RzAnalysisFunction *fcn)
RZ_API int rz_analysis_archinfo(RzAnalysis *analysis, int query)
RZ_API int rz_asm_disassemble(RzAsm *a, RzAsmOp *op, const ut8 *buf, int len)
RZ_API ut32 rz_core_asm_bwdis_len(RzCore *core, int *instr_len, ut64 *start_addr, ut32 nb)
RZ_API int rz_core_cmdf(RzCore *core, const char *fmt,...)
RZ_API void rz_cmd_state_output_array_start(RzCmdStateOutput *state)
Mark the start of an array of elements in the output.
RZ_API void rz_cmd_state_output_array_end(RzCmdStateOutput *state)
Mark the end of an array of elements in the output.
RZ_IPI RzCmdStatus rz_seek_opcode_handler(RzCore *core, int argc, const char **argv)
static void cmd_seek_opcode(RzCore *core, const char *input, bool silent)
RZ_IPI bool rz_core_seek_to_register(RzCore *core, const char *regname, bool is_silent)
RZ_IPI RzCmdStatus rz_seek_function_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_seek_undo_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_seek_register_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_seek_function_current_handler(RzCore *core, int argc, const char **argv)
static void printPadded(RzCore *core, int pad)
RZ_IPI RzCmdStatus rz_seek_padded_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_seek_next_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_seek_prev_handler(RzCore *core, int argc, const char **argv)
RZ_IPI int rz_core_seek_opcode_backward(RzCore *core, int numinstr, bool silent)
RZ_IPI int rz_core_seek_opcode(RzCore *core, int n, bool silent)
static RzCmdStatus bool2cmdstatus(bool res)
RZ_IPI RzCmdStatus rz_seek_delta_handler(RzCore *core, int argc, const char **argv)
RZ_IPI int rz_seek_search(void *data, const char *input)
RZ_IPI RzCmdStatus rz_seek_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_seek_base_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_seek_begin_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_seek_blocksize_backward_handler(RzCore *core, int argc, const char **argv)
RZ_IPI int rz_core_seek_opcode_forward(RzCore *core, int n, bool silent)
RZ_IPI RzCmdStatus rz_seek_undo_reset_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_seek_blocksize_forward_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_seek_end_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_seek_basicblock_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_seek_redo_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_seek_asz_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_seek_history_list_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_API ut64 rz_config_get_i(RzConfig *cfg, RZ_NONNULL const char *name)
RZ_API RzConfigNode * rz_config_set_i(RzConfig *cfg, RZ_NONNULL const char *name, const ut64 i)
RZ_API RZ_BORROW const char * rz_config_get(RzConfig *cfg, RZ_NONNULL const char *name)
RZ_API int rz_cons_printf(const char *format,...)
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()
size_t map(int syms, int left, int len)
RZ_DEPRECATE RZ_API RzAnalysisFunction * rz_analysis_get_fcn_in(RzAnalysis *analysis, ut64 addr, int type)
RZ_API RzAnalysisFunction * rz_analysis_get_function_byname(RzAnalysis *a, const char *name)
RZ_API RzFlagItem * rz_flag_get_at(RzFlag *f, ut64 off, bool closest)
RZ_API void Ht_() free(HtName_(Ht) *ht)
static void list(RzEgg *egg)
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc static sig const char static mode dup
static static fork const void static count static fd const char const char static newpath char char argv
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
RZ_API bool rz_analysis_op_fini(RzAnalysisOp *op)
RZ_API int rz_analysis_op(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8 *data, int len, RzAnalysisOpMask mask)
static void pad(RzStrBuf *sb, ut32 count)
@ RZ_ANALYSIS_OP_MASK_BASIC
#define RZ_ANALYSIS_ARCHINFO_MIN_OP_SIZE
#define rz_warn_if_reached()
enum rz_cmd_status_t RzCmdStatus
@ RZ_CMD_STATUS_OK
command handler exited in the right way
@ RZ_CMD_STATUS_ERROR
command handler had issues while running (e.g. allocation error, etc.)
RZ_API ut64 rz_io_fd_size(RzIO *io, int fd)
RZ_API RzIOMap * rz_io_map_get(RzIO *io, ut64 addr)
#define RZ_LOG_ERROR(fmtstr,...)
RZ_API ut64 rz_num_math(RzNum *num, const char *str)
RZ_API PJ * pj_kb(PJ *j, const char *k, bool v)
RZ_API PJ * pj_end(PJ *j)
RZ_API PJ * pj_ks(PJ *j, const char *k, const char *v)
RZ_API PJ * pj_kn(PJ *j, const char *k, ut64 n)
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
@ RZ_OUTPUT_MODE_STANDARD
RZ_API bool rz_core_seek_redo(RzCore *core)
RZ_API RzList * rz_core_seek_list(RzCore *core)
Return the seek history.
RZ_API bool rz_core_seek_delta(RzCore *core, st64 delta, bool save)
Seek relative to current offset and optionally save the current offset in seek history.
RZ_API bool rz_core_seek_and_save(RzCore *core, ut64 addr, bool rb)
Save currently marked state in seek history and seek to addr .
RZ_API bool rz_core_seek_mark(RzCore *core)
Mark current state (offset+cursor) as the next state to save in history.
RZ_API bool rz_core_seek_next(RzCore *core, const char *type, bool save)
Seek to the next type of item from current offset.
RZ_API int rz_core_seek_base(RzCore *core, const char *hex, bool save)
Seek to a new address composed of current offset with last hex digits replaced with those of hex.
RZ_API void rz_core_seek_reset(RzCore *core)
RZ_API bool rz_core_seek_prev(RzCore *core, const char *type, bool save)
Seek to the previous type of item from current offset.
RZ_API bool rz_core_seek_undo(RzCore *core)
RZ_API bool rz_core_seek_opt(RzCore *core, ut64 addr, bool rb, bool save)
Seek to addr and optionally save the current offset in seek history.
RZ_API bool rz_core_seek_align(RzCore *core, ut64 align, bool save)
Seek to current offset aligned to align.
RZ_API bool rz_core_seek_save(RzCore *core)
Save last marked position, if any, in the seek history.
RZ_API bool rz_core_seek_analysis_bb(RzCore *core, ut64 addr, bool save)
Seek to basic block that contains address addr.
RZ_API bool rz_core_seek(RzCore *core, ut64 addr, bool rb)
Seek to addr.
Represent the output state of a command handler.
int idx
Position of the item relative to the current seek item (0 current seek, < 0 for undos,...
ut64 offset
Value of core->offset at the given time in history.
bool is_current
True if this is the current seek value.
int cursor
Position of the cursor at the given time in history.
RzNumCalc nc
division by zero happened
RZ_API bool rz_core_prevop_addr(RzCore *core, ut64 start_addr, int numinstrs, ut64 *prev_addr)
RZ_API ut64 rz_core_prevop_addr_force(RzCore *core, ut64 start_addr, int numinstrs)
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
static char * regname(int reg)
static bool input(void *ud, zip_uint8_t *data, zip_uint64_t length)