mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-04 03:11:28 +00:00
Reworked in_function() to iterate over all bbs
This commit is contained in:
parent
66a55302ee
commit
4db241262d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user