The pdf
command is able to disassemble a function in radare2. Is there a way to disassemble all functions of a binary in a single radare2 command ?
1 Answer
You can iterate over functions (or anything else) using @@
command modifier.
In your case, after you analyze the binary to get functions, you can run:
pdf @@ fcn*
This command will print the disassembly of every function iterating over function's flags starting with fcn. You can use any other wildcard you want.
You might also want to check out pdr
(pdr.
) command, which prints disassembly recursively across the function graph (form current basic block)
-
There could be some functions which don't have "fcn" in their names. Apr 6, 2021 at 16:16