tags:

views:

193

answers:

2

right now I've been using gdb to disassemble a binary file and check out different registers and whatnot. Is there an easy command to examine everything on the stack? can this be limited to everything in a function?

+1  A: 

For the current stack frame:

  • info frame lists general info about the frame (where things start in memory, etc.)
  • info args lists arguments to the function
  • info locals lists local variables stored in the frame
Michael Mrozek
A: 

"bt" (backtrace) will give you a call stack.

"frame args" will give you information about a specific frame from the stack.

"info locals" can give you information about any local variables on the stack.

dlanod