Make the anal.depth warning more useful ##help

This commit is contained in:
pancake 2022-10-16 20:24:17 +02:00 committed by pancake
parent 332b0d0fcd
commit 54e0b3d251
1 changed files with 3 additions and 3 deletions

View File

@ -536,7 +536,7 @@ static int fcn_recurse(RAnal *anal, RAnalFunction *fcn, ut64 addr, ut64 len, int
char *op_dst = NULL; char *op_dst = NULL;
char *op_src = NULL; char *op_src = NULL;
if (depth < 1) { if (depth < 1) {
R_LOG_DEBUG ("Too deep fcn_recurse at 0x%"PFMT64x, addr); R_LOG_WARN ("Analysis of 0x%08"PFMT64x" stopped at 0x%08"PFMT64x", use a higher anal.depth to continue", fcn->addr, addr);
return R_ANAL_RET_ERROR; // MUST BE TOO DEEP return R_ANAL_RET_ERROR; // MUST BE TOO DEEP
} }
// TODO Store all this stuff in the heap so we save memory in the stack // TODO Store all this stuff in the heap so we save memory in the stack
@ -673,8 +673,7 @@ static int fcn_recurse(RAnal *anal, RAnalFunction *fcn, ut64 addr, ut64 len, int
op = r_anal_op_new (); op = r_anal_op_new ();
while (addrbytes * idx < maxlen) { while (addrbytes * idx < maxlen) {
if (!last_is_reg_mov_lea) { if (!last_is_reg_mov_lea) {
free (last_reg_mov_lea_name); R_FREE (last_reg_mov_lea_name);
last_reg_mov_lea_name = NULL;
} }
if (anal->limit && anal->limit->to <= addr + idx) { if (anal->limit && anal->limit->to <= addr + idx) {
break; break;
@ -961,6 +960,7 @@ repeat:
last_is_reg_mov_lea = true; last_is_reg_mov_lea = true;
} }
} }
}
#else #else
if (op->ptr != UT64_MAX) { if (op->ptr != UT64_MAX) {
leaddr_pair *pair = R_NEW (leaddr_pair); leaddr_pair *pair = R_NEW (leaddr_pair);