How do I print the value of %eax and %ebp?
%eax
%ebp
(gdb) p $eax $1 = void
There is also:
info all-registers
Then you can get the register name you are interested in -- very useful for finding platform-specific registers (like NEON Q... on ARM).