Show family in p*j

This commit is contained in:
jvoisin 2015-10-08 17:02:22 +02:00
parent 075efefd15
commit 790a42f563
2 changed files with 3 additions and 2 deletions

View File

@ -252,7 +252,7 @@ static int analop(RAnal *a, RAnalOp *op, ut64 addr, const ut8 *buf, int len) {
const char *bp = (a->bits==16)?"bp":
(a->bits==32)?"ebp":"rbp";
op->size = insn->size;
op->family = 0;
op->family = R_ANAL_OP_FAMILY_CPU; // almost everything is CPU
op->prefix = 0;
switch (insn->detail->x86.prefix[0]) {
case X86_PREFIX_REPNE:

View File

@ -2996,7 +2996,8 @@ R_API int r_core_print_disasm_json(RCore *core, ut64 addr, ut8 *buf, int nb_byte
r_cons_printf (",\"esil\":\"%s\"", esil);
}
r_cons_printf (",\"bytes\":\"%s\"", asmop.buf_hex);
//r_cons_printf (",\"family\":\"%s\"", asmop.family);
r_cons_printf (",\"family\":\"%s\"",
r_anal_op_family_to_string (analop.family));
r_cons_printf (",\"type\":\"%s\"", r_anal_optype_to_string (analop.type));
// wanted the numerical values of the type information
r_cons_printf (",\"type_num\":%"PFMT64d, analop.type);