2

I would really like a debugging tool that is able to visualise the current stack frame (bytes between RSP and RBP) as a block diagram.

Something like this, but with real execution values in the cells: http://abrickshort.files.wordpress.com/2006/11/stackframe.jpg

Does such software exist? I'm using a UNIX system.

PS.

Aware of gdb's "examine bytes" function. That's what I use now, but I would like pretty diagrams to show my supervisor.

Cheers

Edd Barrett
  • 3,425
  • 2
  • 29
  • 48

1 Answers1

0

GDB won't be able to give you the diagram off-the-shelf, but info frame n gives almost everything you need:

(gdb) info frame 2
Stack frame at 0x7ffff7fe3fe0:
 rip = 0x3cbd806ccb in start_thread (pthread_create.c:301); saved rip 0x3cbd0e0c2d
 called by frame at 0x0, caller of frame at 0x7ffff7fe3ed0
 source language c.
 Arglist at 0x7ffff7fe3ec8, args: arg=0x7ffff7fe4700
 Locals at 0x7ffff7fe3ec8, Previous frame's sp is 0x7ffff7fe3fe0
 Saved registers:
  rbx at 0x7ffff7fe3fd0, rip at 0x7ffff7fe3fd8
Kevin
  • 4,618
  • 3
  • 38
  • 61