Debugging with GDB Manual The GNU Source-Level Debugger (769148-001, March 2014)
Supported Number Formats
You can always enter numbers in octal, decimal, or hexadecimal in GDB by the usual conventions:
octal numbers begin with `0', decimal numbers end with `.', and hexadecimal numbers begin with
`0x'. Numbers that begin with none of these are, by default, entered in base 10; likewise, the
default display for numbers|when no particular format is specified| is base 10. You can change
the default base for both input and output with the set radix command.
set input-radix base Set the default base for numeric input. Supported choices for
base are decimal 8, 10, or 16. base must itself be specified
either unambiguously or using the current default radix; for
example, any of
set radix 012
set radix 10
set radix 0xa
sets the base to decimal. On the other hand, set radix 10
leaves the radix unchanged no matter what it was.
set output-radix base Set the default base for numeric display. Supported choices for
base are decimal 8, 10, or 16. base must itself be specified
either unambiguously or using the current default radix.
show input-radix Display the current default base for numeric input.
show output-radix Display the current default base for numeric display.
Optional warnings and messages
By default, GDB is silent about its inner workings. If you are running on a slow machine, you may
want to use the set verbose command. This makes GDB tell you when it does a lengthy internal
operation, so you will not think it has crashed.
Currently, the messages controlled by set verbose are those which announce that the symbol table
for a source file is being read; see symbol-file in “Commands to specify files” (page 88).
set verbose on Enables GDB output of certain informational messages.
set verbose off Disables GDB output of certain informational messages.
show verbose Displays whether set verbose is on or o.
By default, if GDB encounters bugs in the symbol table of an object file, it is silent; but if you are
debugging a compiler, you may find this information useful (see “Specifying shared library locations”
(page 91)).
set complaints limit Permits GDB to output limit complaints about each type of
unusual symbols before becoming silent about the problem. Set
limit to zero to suppress all complaints; set it to a large number
to prevent complaints from being suppressed.
show complaints Displays how many symbol complaints GDB is permitted to
produce.
By default, GDB is cautious, and asks the user to confirm on certain commands. For example, if
you try to run a program which is already running:
((gdb)) run
The program being debugged has been started already.
Start it from the beginning? (y or n)
If you are willing to unflinchingly face the consequences of your own commands, you can disable
this feature:
set confirm off Disables confirmation requests.
set confirm on Enables confirmation requests (the default).
218 Controlling GDB