Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to print in binary mode in gdb?

Tags:

gdb

I tried b but seem not:

(gdb) p/b 0x0000000000400398 Size letters are meaningless in "print" command. 

Is there such a switch?

like image 950
compiler Avatar asked Mar 29 '11 09:03

compiler


1 Answers

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.

like image 114
Paul R Avatar answered Sep 19 '22 10:09

Paul R