TransWikia.com

What does anal.hasnext actually do?

Reverse Engineering Asked by user1720897 on May 6, 2021

I am trying to understand anal.hasnext control flow configuration option of Radare. The documentation says "Continue analysis after each function. Forces to find a function, after the end of a function." So how far does it continue analysis after the end of a function. Does it stop after finding one more function after the end or continue further. At what point does it stop? Without this would it stop at the ret instruction? Can someone give me code example in C where this could be useful.

One Answer

hasnext tries to get the function behind the current one. It also skips padding stuff like int3 (0xcc), nop (0x90) and such (on x86). anal.depth defines the limit of this behaviour. every 'next' function will decrement it by one. For more information see canal.c (__core_anal_fcn) and search for has_next.

Correct answer by defragger on May 6, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP