I\'m a bit confused about the uses of x and p in gdb. Which one do I use to look at the contents of a register and which one to look at something in memory?
x shows you the contents of a memory address
x
p shows you the value stored in a named variable
p
info registers and info frame shows you registers and what they're doing.
info registers
info frame