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. Note
that source styling only works if styling in general is enabled, and
if gdb was linked with the GNU Source Highlight library. The
default is ‘on’.
show style sourcesSubcommands 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 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.