I am a bit confused about using x and p in gdb. Which one do I use to look at the contents of the register and which one look at something in memory?
x shows contents of memory address
x
p shows you the value stored in a named variable
p
info registersand info frameregisters are displayed and what they do.
info registers
info frame