Reworked in_function() to iterate over all bbs

This commit is contained in:
Markus Lottmann 2016-10-09 10:50:33 +02:00 committed by radare
parent 66a55302ee
commit 4db241262d

View File

@ -11,7 +11,16 @@
#define SLOW_IO 0
#define HASNEXT_FOREVER 1
#define in_function(fn,y) ((y) >= (fn)->addr && (y) < ((fn)->addr + r_anal_fcn_size (fn)))
static bool in_function(RAnalFunction *fcn, ut64 addr) {
RListIter *iter;
RAnalBlock *bbi;
r_list_foreach (fcn->bbs, iter, bbi) {
if (addr >= bbi->addr && addr < bbi->addr + bbi->size) {
return true;
}
}
return false;
}
#define HINTCMD_ADDR(hint,x,y) if(hint->x) \
r_cons_printf (y" @ 0x%"PFMT64x"\n", hint->x, hint->addr)