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!
Asked
Active
Viewed 145 times
-2
-
You may, but it's very much platform dependent. – Some programmer dude Oct 05 '13 at 22:21
-
This is a dupe if you want it [for Windows](http://stackoverflow.com/q/6205981/179910). Also a dupe if you want it [for Linux](http://stackoverflow.com/q/3179487/179910). – Jerry Coffin Oct 05 '13 at 22:28
-
i am sorry, i am talking about gdb command – user2721125 Oct 05 '13 at 22:43
1 Answers
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
-
-