Could anyone tell me the basic steps and most used radare2 commands for debugging a hang x86 application to find the source of the hang?
I know this question may sound a bit broad but I don't know where to learn this better than here.
You just have to attach to the hanging process as follow:
$ pidof myhangingprocess
32220
$ r2 -d 32220
And, that should start a radare2 session on the program you are inspecting. But, for debugging, I would greatly prefer to use gdb
(radare2 is a good tool for reverse-engineering but not really for debugging).
gdb
, it lacks some useful features like the representation of the stack-frame or watchpoints or tracepoint, and so on. But, this is "normal" as the goal of radare2 is to be a reverse-engineering tool and not a debugger.