Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between x and p in gdb?

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?

like image 453
user2378481 Avatar asked Jan 11 '14 04:01

user2378481


1 Answers

x shows you the contents of a memory address

p shows you the value stored in a named variable

info registers and info frame shows you registers and what they're doing.

like image 59
Bandrami Avatar answered Oct 23 '22 19:10

Bandrami