Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make gdb print out all values in hexadecimal mode?

Tags:

c

debugging

gdb

By default, gdb always prints/displays all variables / arguments in base 10. Is there any way to ask gdb to always use base 16 while printing anything (and turn back to default settings when I don't need that) ? I know that it can be printed by supplying the '/x' argument to print/display, but I don't want to do it everytime....

like image 697
TCSGrad Avatar asked Jul 08 '11 00:07

TCSGrad


1 Answers

set output-radix 16 (and set output-radix 10 to switch it back).

like image 73
Matthew Slattery Avatar answered Oct 13 '22 08:10

Matthew Slattery