diff --git a/doc/all68k.r2 b/doc/all68k.r2 index e08b2d2687..27c6122dce 100755 --- a/doc/all68k.r2 +++ b/doc/all68k.r2 @@ -1,4 +1,4 @@ -#!/usr/bin/r2 - -i +#!/usr/bin/r2 - -qi # Usage: # r2 -qi all68k - > all68k.txt # diff --git a/libr/anal/fcn.c b/libr/anal/fcn.c index 92b85e9868..a8c64c466f 100644 --- a/libr/anal/fcn.c +++ b/libr/anal/fcn.c @@ -230,6 +230,12 @@ static int fcn_recurse(RAnal *anal, RAnalFunction *fcn, ut64 addr, ut8 *buf, ut6 } } switch (op.type) { + case R_ANAL_OP_TYPE_NOP: + if ((addr+idx-oplen) == fcn->addr) { + fcn->addr = bb->addr = addr + idx; + continue; + } + break; case R_ANAL_OP_TYPE_JMP: #if 1 if (!r_anal_fcn_xref_add (anal, fcn, op.addr, op.jump, @@ -290,10 +296,11 @@ static int fcn_recurse(RAnal *anal, RAnalFunction *fcn, ut64 addr, ut8 *buf, ut6 R_ANAL_REF_TYPE_CALL : R_ANAL_REF_TYPE_CODE)) { r_anal_op_fini (&op); //fcn->size = bbsum (fcn); - FITFCNSZ(); + FITFCNSZ (); return R_ANAL_RET_ERROR; } break; + //case R_ANAL_OP_TYPE_HLT: case R_ANAL_OP_TYPE_TRAP: case R_ANAL_OP_TYPE_UJMP: case R_ANAL_OP_TYPE_RET: diff --git a/libr/anal/p/anal_x86_udis.c b/libr/anal/p/anal_x86_udis.c index 44e9251e7e..81c663d73b 100644 --- a/libr/anal/p/anal_x86_udis.c +++ b/libr/anal/p/anal_x86_udis.c @@ -394,7 +394,7 @@ default: op->fail = addr + oplen; break; case UD_Ihlt: - //op->type = R_ANAL_OP_TYPE_HALT; + op->type = R_ANAL_OP_TYPE_TRAP; //HALT; break; case UD_Iret: case UD_Iretf: