According to Radare2 documentation, this is the command to find paths:
agt [addr] find paths from current offset to given address
But when I try the command, after running aaaaa
analysis, I get the following error:
[0x00430044]> agt 0x0042aa98 > agtoutput.dot
Unable to find source or destination basic block
I can confirm that the two addresses are functions and I can graph each function individually. Also, 0x00430044
does lead to 0x0042aa98
. I can see that from the gdb trace. I looked at the radare2 canal.c code and found that it's looking through the RAnalFunction->bbs
for the provided addresses. I tried ensuring that bbs was populated with those addressings by running abb $s
abb [length] analyze N bytes and extract basic blocks
and feeding the output back into r2. I ran abb $s
from various locations to see if it would add the basic blocks to the bbs list. The various locations were 0x0
, 0x00430044
, and 0x0042aa98
. But nothing worked, I always get the "Unable to find source or destination basic block" error message. I could be way off and going down rabbit holes, but the "find paths" feature would be so useful, and I'd really like to get it working? Any help on using the agt
feature as documented would be appreciated.