From 62b7fa7c4c70e0febd6c4affa2afc94337b97e54 Mon Sep 17 00:00:00 2001 From: pancake Date: Fri, 20 Oct 2017 02:21:19 +0200 Subject: [PATCH] Bring back V& with anal hints --- libr/core/visual.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/libr/core/visual.c b/libr/core/visual.c index 19a63e711f..a521e7fd1a 100644 --- a/libr/core/visual.c +++ b/libr/core/visual.c @@ -1537,6 +1537,20 @@ R_API int r_core_visual_cmd(RCore *core, const char *arg) { } } break; + case '&': + { + RAnalHint *hint = r_anal_hint_get (core->anal, core->offset); + // const char *arch = r_config_get_i (core->config, "asm.arch"); + int bits = hint? hint->bits : r_config_get_i (core->config, "asm.bits"); + // TODO: Honor core->assembler->cur->bitsmask + //if (hint) { + int nb = bits == 64 ? 8: + bits == 32 ? 64: + bits == 16 ? 32: + bits == 8 ? 16: bits; + r_core_cmdf (core, "ahb %d", nb); + } + break; case 'a': { if (core->file && core->io && !(r_io_desc_get (core->io, core->file->fd)->flags & 2)) {