global-variables gdb context - Printing all global variables/local variables?

1 Answers

In case you want to see the local variables of a calling function use select-frame before info locals


(gdb) bt
#0  0xfec3c0b5 in _lwp_kill () from /lib/
#1  0xfec36f39 in thr_kill () from /lib/
#2  0xfebe3603 in raise () from /lib/
#3  0xfebc2961 in abort () from /lib/
#4  0xfebc2bef in _assert_c99 () from /lib/
#5  0x08053260 in main (argc=1, argv=0x8047958) at ber.c:480
(gdb) info locals
No symbol table info available.
(gdb) select-frame 5
(gdb) info locals
i = 28
value member info

How can I print all global variables/local variables? Is that possible in gdb?