Add disasm field to ao command output ##anal

This commit is contained in:
JC Alvarado 2019-04-27 04:56:25 -04:00 committed by radare
parent 6030783c7a
commit fd38e6b139

View File

@ -1622,6 +1622,21 @@ static void core_anal_bytes(RCore *core, const ut8 *buf, int len, int nops, int
r_anal_esil_stack_free (esil);
}
} else {
char disasm[128] = { 0 };
r_parse_varsub (core->parser, NULL,
core->offset + idx,
asmop.size, r_asm_op_get_asm (&asmop),
disasm, sizeof (disasm));
ut64 killme = UT64_MAX;
if (r_io_read_i (core->io, op.ptr, &killme, op.refptr, be)) {
core->parser->relsub_addr = killme;
}
char *p = strdup (disasm);
if (p) {
r_parse_filter (core->parser, addr, core->flags, hint, p,
disasm, sizeof (disasm), be);
free (p);
}
#define printline(k, fmt, arg)\
{ \
if (use_color)\
@ -1632,6 +1647,7 @@ static void core_anal_bytes(RCore *core, const ut8 *buf, int len, int nops, int
}
printline ("address", "0x%" PFMT64x "\n", core->offset + idx);
printline ("opcode", "%s\n", r_asm_op_get_asm (&asmop));
printline ("disasm", "%s\n", disasm);
printline ("mnemonic", "%s\n", mnem);
if (hint) {
if (hint->opcode) {