mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-06 13:18:20 +00:00
Workaround to ensure mips / branch delayed code properly accounts function size.
This commit is contained in:
parent
f6f62cd871
commit
b61a3772b2
@ -380,8 +380,17 @@ static int fcn_recurse(RAnal *anal, RAnalFunction *fcn, ut64 addr, ut8 *buf, ut6
|
||||
|
||||
anal->iob.read_at (anal->iob.io, op.fail, bbuf, sizeof (bbuf));
|
||||
FITFCNSZ();
|
||||
// TODO: Discuss this 'return' statement, is this only necessary for mips?
|
||||
return fcn_recurse (anal, fcn, op.fail, bbuf, sizeof (bbuf), depth-1);
|
||||
// TODO: Discuss bypassing this 'return' statement,
|
||||
// is this only necessary for branch delayed instructions?
|
||||
ret = fcn_recurse (anal, fcn, op.fail, bbuf, sizeof (bbuf), depth-1);
|
||||
if (!op.delay) {
|
||||
// this will be all x86, arm (at least)
|
||||
// without which the analysis is really slow,
|
||||
// presumably because each opcode would get revisited
|
||||
// (and already covered by a bb) many times
|
||||
return ret;
|
||||
}
|
||||
// For some reason, branch delayed code (MIPS) needs to continue
|
||||
#if 0
|
||||
// do not add xrefs for cjmps?
|
||||
r_anal_op_fini (&op);
|
||||
|
Loading…
Reference in New Issue
Block a user