I am new to GDB, so I have some questions:
How can I look at content of the stack? Example: to see content of register, I type info registers.
info registers
You need to use gdb's memory-display commands. The basic one is x, for examine. There's an example on the linked-to page that uses
gdb> x/4xw $sp
to print "four words (w ) of memory above the stack pointer (here, $sp) in hexadecimal (x)". The quotation is slightly paraphrased.
w
$sp
x