Bring back V& with anal hints

This commit is contained in:
pancake 2017-10-20 02:21:19 +02:00
parent c8865bbd4e
commit 62b7fa7c4c

View File

@ -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)) {