How to print in binary mode in gdb?

You need the /t switch which works with both p and x:

(gdb) p /t 0x0000000000400398
$1 = 10000000000001110011000

See help x for more info on the FMT (format) switches.


x/4tb 0x0000000000400398 will let you analyze the Memory Address with Binary Values.