Next: Numbers, Previous: Screen Size, Up: Controlling GDB
gdb can style its output on a capable terminal. This is enabled by default on most systems, but disabled by default when in batch mode (see Mode Options). Various style settings are available; and styles can also be disabled entirely.
set style enabled `on|off'show style enabledset style sources `on|off'list command, is styled. The
default is `on'. Note that source styling only works if styling
in general is enabled, and if a source highlighting library is
available to gdb.
There are two ways that highlighting can be done. First, if
gdb was linked with the GNU Source Highlight library, then it
is used. Otherwise, if gdb was configured with Python
scripting support, and if the Python Pygments package is available,
then it will be used.
show style sourcesset style disassembler enabled `on|off'disassemble
command, is styled. Disassembler styling only works if styling in
general is enabled (with set style enabled on), and if a source
highlighting library is available to gdb.
To highlight disassembler output, gdb must be compiled with
Python support, and the Python Pygments package must be available. If
these requirements are not met then gdb will not highlight
disassembler output, even when this option is `on'.
show style disassembler enabledSubcommands of set style control specific forms of styling.
These subcommands all follow the same pattern: each style-able object
can be styled with a foreground color, a background color, and an
intensity.
For example, the style of file names can be controlled using the
set style filename group of commands:
set style filename background colorset style filename foreground colorset style filename intensity valueThe show style command and its subcommands are styling
a style name in their output using its own style.
So, use show style to see the complete list of styles,
their characteristics and the visual aspect of each style.
The style-able objects are:
filenamefunctionset style function family of commands. By default, this
style's foreground color is yellow.
variableset style variable family of commands. By default, this style's
foreground color is cyan.
addressset style address family of commands. By default, this style's
foreground color is blue.
versionIn order to control how gdb styles the version number at
startup, add the set style version family of commands to the
early initialization command file (see Initialization Files).
titleset style title family of commands. By default, this style's
intensity is bold. Commands are using the title style to improve
the readability of large output. For example, the commands
apropos and help are using the title style
for the command names.
highlightset style highlight family of commands. By default, this style's
foreground color is red. Commands are using the highlight style to draw
the user attention to some specific parts of their output. For example,
the command apropos -v REGEXP uses the highlight style to
mark the documentation parts matching regexp.
tui-borderset style. This was done for compatibility reasons, as TUI
controls to set the border's intensity predated the addition of
general styling to gdb. See TUI Configuration.
tui-active-border