How to print register values in GDB?

assem picture assem · Mar 25, 2011 · Viewed 257.9k times · Source

How do I print the value of %eax and %ebp?

(gdb) p $eax
$1 = void

Answer

geekosaur picture geekosaur · Mar 25, 2011

info registers shows all the registers; info registers eax shows just the register eax. The command can be abbreviated as i r