diff --git a/libr/core/canal.c b/libr/core/canal.c index d53e4580c3..809e852012 100644 --- a/libr/core/canal.c +++ b/libr/core/canal.c @@ -539,7 +539,7 @@ static int r_anal_analyze_fcn_refs(RCore *core, RAnalFunction *fcn, int depth) { static int core_anal_fcn(RCore *core, ut64 at, ut64 from, int reftype, int depth) { if (depth < 0) { - eprintf ("Too deep for 0x%08"PFMT64x"\n", at); + // eprintf ("Too deep for 0x%08"PFMT64x"\n", at); return false; } int has_next = r_config_get_i (core->config, "anal.hasnext"); diff --git a/libr/core/cmd.c b/libr/core/cmd.c index c6e56d6e4b..c97fe4fe57 100644 --- a/libr/core/cmd.c +++ b/libr/core/cmd.c @@ -1191,10 +1191,9 @@ static int cmd_resize(void *data, const char *input) { eprintf ("r_io_resize: cannot resize\n"); } } - - if (delta && core->offset < newsize) + if (delta && core->offset < newsize) { r_io_shift (core->io, core->offset, grow?newsize:oldsize, delta); - + } if (!grow) { ret = r_io_resize (core->io, newsize); if (ret < 1) { diff --git a/libr/core/disasm.c b/libr/core/disasm.c index 69e457d56f..9fa8bc9fbd 100644 --- a/libr/core/disasm.c +++ b/libr/core/disasm.c @@ -3042,6 +3042,18 @@ static bool ds_print_core_vmode_jump_hit(RDisasmState *ds, int pos) { return false; } +static void getPtr(RDisasmState *ds, ut64 addr, int pos) { + ut8 buf[sizeof(ut64)] = {0}; + r_io_read_at (ds->core->io, addr, buf, sizeof (buf)); + if (ds->core->assembler->bits == 64) { + ut64 n64 = r_read_ble64 (buf, 0); + ds_print_shortcut (ds, n64, pos); + } else { + ut32 n32 = r_read_ble32 (buf, 0); + ds_print_shortcut (ds, n32, pos); + } +} + static void ds_print_core_vmode(RDisasmState *ds, int pos) { RCore *core = ds->core; bool gotShortcut = false; @@ -3050,6 +3062,15 @@ static void ds_print_core_vmode(RDisasmState *ds, int pos) { return; } switch (ds->analop.type) { + case R_ANAL_OP_TYPE_UJMP: + case R_ANAL_OP_TYPE_UJMP | R_ANAL_OP_TYPE_IND: + case R_ANAL_OP_TYPE_UJMP | R_ANAL_OP_TYPE_IND | R_ANAL_OP_TYPE_COND: + case R_ANAL_OP_TYPE_UJMP | R_ANAL_OP_TYPE_IND | R_ANAL_OP_TYPE_REG: + if (ds->show_leahints) { + getPtr (ds, ds->analop.ptr, pos); + gotShortcut = true; + } + break; case R_ANAL_OP_TYPE_MOV: case R_ANAL_OP_TYPE_LEA: case R_ANAL_OP_TYPE_LOAD: