-2

Is there a way to do this - not with just getting the last things that were in esp/rsp because when I use that in my program I also get the variables that were there but now there are not here. Thanks!

Jester
  • 56,577
  • 4
  • 81
  • 125

1 Answers1

2

Use the command backtrace full (or abbreviate to bt full) to get all the local variables from parent frames too.

Jester
  • 56,577
  • 4
  • 81
  • 125
  • Depending on what you mean by stack state, yes. It shows local variables that live on the stack. Assuming you have debug info for your program. Why not just try and see? – Jester Oct 05 '13 at 22:58
  • I have used this and doesnt help. Get this:#0 0x0000000000400838 in ret_arr() () No symbol table info available. #1 0x000000000040085c in main () No symbol table info available. – user2721125 Oct 05 '13 at 23:07
  • Then you didn't compile with debug info. – Jester Oct 05 '13 at 23:09
  • I wish I could upvote this more than once. Thank you so much. – Games Brainiac Jun 20 '15 at 11:24