5

I am using radare2 in debugging mode (r2 -d ./program). I set up a breakpoint at a certain address (db 0x12341234) And next I have entered Visual View using: V!

Following some tutorials, I saw them using 's' to switch to the next instruction, but that isn't working for me. Also this is not working:

Maybe a simpler method to use debugger in radare is to switch it to visual mode. That way you will not have to remember many commands nor to keep program state in your mind. To enter visual mode use V:

[0xB7F0C8C0]> V

The initial view after entering visual mode is a hexdump view of current target program counter (e.g., EIP for x86). Pressing p will allow you to cycle through the rest of visual mode views. You can press p and P to rotate through the most commonly used print modes. Use F7 or s to step into and F8 or S to step over current instruction. With the c key you can toggle the cursor mode to mark a byte range selection (for example, to later overwrite them with nop). You can set breakpoints with F2 key.

Any key I would press does nothing. Am I missing something or?

I am talking about this view.

7

First of all, make sure you run the latest version of radare2 from git repository:

$ git clone https://github.com/radare/radare2.git
$ cd radare2
$ ./sys/install.sh

If you don’t want to install the git version or you want the binaries for another machine (Windows, OS X, iOS, etc) check out the download page at the radare2 website.

radare2 has several different Visual Views, before I'll explain them - please analyze the program using aa and seek to a function using s <function_name>. You can list the functions recognized by radare2 using afl.

  • V - The basic Visual Mode. You can toggle between the views using p and P.
  • VV - Visual Graph Mode, Displays an ASCII graph view. Again you can toggle between the views using p and P.
  • V! - Visual Panels Mode, which is the mode you attached to your question.

In each of the modes mentioned above you can press ? in order to list the commands available. The commands varies between the different modes.

Pressing s and S inside a Visual view while debugging will step-in and step-over respectively. radare will automatically sync the view with eip on every step.
In Visual Panels Mode (V!) you can use TAB to navigate between the panels and h/j/k/l to move inside the view/panel.
You can run r2 commands from inside Visual Mode using : (ie. s 0x00402c1e).

If it still doesn't work and you believe it's a problem with radare please open an issue and the great contributors of radare2 will be happy to help you.

  • Thank You, it was a nice answer. Apparently I had an older version :3 – Fineas Silaghi Jun 22 '17 at 7:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.