I would like to use Radare2 to learn about how C is assembled into assembly but I am having trouble with the layout. I think the V! mode would be very handy as you can watch the registers update as the instruction pointer moves through the program, but I don't understand the layout.
This is an example of they layout I would like:
It seems when I add a window (like Stack or Registers in this photo) it appears offscreen and I have to try closing different and splitting windows until the layout kind of falls into place. Is there an easy way to change exactly what is in each window?
I know "X" closes a window, "z" switches the current window to the front, and "-" / "|" split a window.
I have tried looking at the help but can't seem to figure out any other commands related to this issue.
ENVIRONMENT
SOLUTION
To create the layout you have described change the commands shown in the default layout by:
The further documentation shown below can be found here: https://radare.gitbooks.io/radare2book/visual_mode/visual_panels.html
|Visual Ascii Art Panels:
| | split the current panel vertically
| - split the current panel horizontally
| : run r2 command in prompt
| _ start the hud input mode
| ? show this help
| ?? show the user-friendly hud
| ! run r2048 game
| . seek to PC or entrypoint
| * show pseudo code/r2dec in the current panel
| / highlight the keyword
| ( toggle snow
| & toggle cache
| [1-9] follow jmp/call identified by shortcut (like ;[1])
| ' ' (space) toggle graph / panels
| tab go to the next panel
| a toggle auto update for decompiler
| b browse symbols, flags, configurations, classes, ...
| c toggle cursor
| C toggle color
| d define in the current address. Same as Vd
| D show disassembly in the current panel
| e change title and command of current panel
| g go/seek to given offset
| G show graph in the current panel
| i insert hex
| hjkl move around (left-down-up-right)
| J scroll panels down by page
| K scroll panels up by page
| H scroll panels left by page
| L scroll panels right by page
| m select the menu panel
| M open new custom frame
| nN create new panel with given command
| pP seek to next or previous scr.nkey
| q quit, back to visual mode
| r toggle jmphints/leahints
| sS step in / step over
| t rotate related commands in a panel
| uU undo / redo seek
| w start Window mode
| V go to the graph mode
| X close current panel
| z swap current panel with the first one
EXAMPLE
Open visual panels
user@host:~$ r2 /bin/ls
[0x00005850]> aaaa
...
[0x00005850]> s main
[0x00003e90]> V!
Default view after opening visual panels
Select top right panel then right click and select registers
Select lower right panel then right click and select stack
Final view
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With