Skip to main content
4 of 6
added 24 characters in body
Megabeets
  • 9k
  • 2
  • 24
  • 48

You can easily view it using Visual Panels in radare2. Here's a teaser:

enter image description here

Installation

First of all, install radare2 from git repository:

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

Debugging

To debug a program with radare2 call it with the debug flag -d:
$ r2 -d /bin/ls

Now the program is opened in debug mode.
Use v! to show the Visual Panel modes. Now you can see the assembly at the left and the stack panel at the right. You can step into and step over using s or S accordingly. Use ? to list more commands in the Visual Panels mode.

Some more ways to display the stack

  • pxa @ rsp - to show annotated hexdump
  • pxw @ rsp - to show hexadecimal words dump (32bit)
  • pxq @ rsp - to show hexadecimal quad-words dump (64bit)
  • ad@r:SP - to analyze the stack data

To read more about debugging with radare2 it is recommended to read radare2 book and especially the Basic Debugger Session chapter.

Megabeets
  • 9k
  • 2
  • 24
  • 48