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 enabled
set 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 sources
Subcommands 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:
filename
function
set style function
family of commands. By default, this
style's foreground color is yellow.
variable
set style variable
family of commands. By default, this style's
foreground color is cyan.
address
set style address
family of commands. By default, this style's
foreground color is blue.
version
In 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).
title
set 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.
highlight
set 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-border
set 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