Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH] Two changes to the style documentation
Date: Mon,  9 Nov 2026 07:35:04 -0700	[thread overview]
Message-ID: <20261109143504.367171-1-tromey@adacore.com> (raw)

I noticed that the "set style" commands aren't in any discernible
order.  This patch reorganizes the table to sort them alphabetically.

Also, I've added a link to the NO_COLOR website.
---
 gdb/doc/gdb.texinfo | 161 ++++++++++++++++++++++----------------------
 1 file changed, 82 insertions(+), 79 deletions(-)

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index bfc5b8760b9..7998dfb58c8 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -28426,6 +28426,8 @@ most hosts defaulting to @samp{on}.
 
 If the @env{NO_COLOR} environment variable is set to a non-empty
 value, then @value{GDBN} will change this to @samp{off} at startup.
+See @url{https://no-color.org/} for more information on
+@env{NO_COLOR}.
 
 @item show style enabled
 Show the current state of styling.
@@ -28565,11 +28567,63 @@ So, use @command{show style} to see the complete list of styles,
 their characteristics and the visual aspect of each style.
 
 The style-able objects are:
+
 @table @code
+@item address
+Control the styling of addresses.  These are managed with the
+@code{set style address} family of commands.  By default, this style's
+foreground color is blue.
+
+This style is also used for addresses in styled disassembler output
+if @value{GDBN} is using its builtin disassembler library for styling
+(@pxref{style_disassembler_enabled,,@kbd{set style disassembler
+enabled}}).
+
 @item command
 Control the styling of any @value{GDBN} commands that are displayed by
 @value{GDBN}.  By default, this style's intensity is bold.
 
+@item disassembler address
+Control the styling of address operands in the disassembler output.
+This is an alias for the @samp{address} style.
+
+@item disassembler comment
+Control the styling of comments in the disassembler output.  These are
+managed with the @code{set style disassembler comment} family of
+commands.  This style is only used when @value{GDBN} is styling using
+its builtin disassembler library
+(@pxref{style_disassembler_enabled,,@kbd{set style disassembler
+enabled}}).  By default, this style's intensity is dim, and its
+foreground color is white.
+
+@item disassembler immediate
+Control the styling of numeric operands in the disassembler output.
+These are managed with the @code{set style disassembler immediate}
+family of commands.  This style is not used for instruction operands
+that represent addresses, in that case the @samp{disassembler address}
+style is used.  This style is only used when @value{GDBN} is styling
+using its builtin disassembler library.  By default, this style's
+foreground color is blue.
+
+@item disassembler mnemonic
+Control the styling of instruction mnemonics in the disassembler
+output.  These are managed with the @code{set style disassembler
+mnemonic} family of commands.  This style is also used for assembler
+directives, e.g.@: @code{.byte}, @code{.word}, etc.  This style is
+only used when @value{GDBN} is styling using its builtin disassembler
+library.  By default, this style's foreground color is green.
+
+@item disassembler register
+Control the styling of register operands in the disassembler output.
+These are managed with the @code{set style disassembler register}
+family of commands.  This style is only used when @value{GDBN} is
+styling using its builtin disassembler library.  By default, this style's
+foreground color is red.
+
+@item disassembler symbol
+Control the styling of symbol names in the disassembler output.  This
+is an alias for the @samp{function} style.
+
 @item filename
 Control the styling of file names and URLs.  By default, this style's
 foreground color is green.
@@ -28584,43 +28638,6 @@ if @value{GDBN} is using its builtin disassembler library for styling
 (@pxref{style_disassembler_enabled,,@kbd{set style disassembler
 enabled}}).
 
-@item line-number
-Control the styling of line numbers.  By default, this style's
-intensity is dim.
-
-@item variable
-Control the styling of variable names.  These are managed with the
-@code{set style variable} family of commands.  By default, this style's
-foreground color is cyan.
-
-@item address
-Control the styling of addresses.  These are managed with the
-@code{set style address} family of commands.  By default, this style's
-foreground color is blue.
-
-This style is also used for addresses in styled disassembler output
-if @value{GDBN} is using its builtin disassembler library for styling
-(@pxref{style_disassembler_enabled,,@kbd{set style disassembler
-enabled}}).
-
-@item version
-Control the styling of @value{GDBN}'s version number text.  By
-default, this style's foreground color is magenta and it has bold
-intensity.  The version number is displayed in two places, the output
-of @command{show version}, and when @value{GDBN} starts up.
-
-In order to control how @value{GDBN} styles the version number at
-startup, add the @code{set style version} family of commands to the
-early initialization command file (@pxref{Initialization
-Files}).
-
-@item title
-Control the styling of titles.  These are managed with the
-@code{set style title} family of commands.  By default, this style's
-intensity is bold.  The title style is used when displaying the header
-line of a list, for example the first line of the output of
-@code{info breakpoints} (@pxref{Set Breaks}).
-
 @item highlight
 Control the styling of highlightings.  These are managed with the
 @code{set style highlight} family of commands.  By default, this style's
@@ -28629,6 +28646,10 @@ the user attention to some specific parts of their output.  For example,
 the command @command{apropos -v REGEXP} uses the highlight style to
 mark the documentation parts matching @var{regexp}.
 
+@item line-number
+Control the styling of line numbers.  By default, this style's
+intensity is dim.
+
 @item metadata
 Control the styling of data annotations added by @value{GDBN} to data
 it displays.  By default, this style's intensity is dim.  Metadata
@@ -28639,6 +28660,17 @@ for errors and @samp{<optimized-out>} annotations for optimized-out
 values in displaying stack frame information in backtraces
 (@pxref{Backtrace}), etc.
 
+@item title
+Control the styling of titles.  These are managed with the
+@code{set style title} family of commands.  By default, this style's
+intensity is bold.  The title style is used when displaying the header
+line of a list, for example the first line of the output of
+@code{info breakpoints} (@pxref{Set Breaks}).
+
+@item tui-active-border
+Control the styling of the active TUI border; that is, the TUI window
+that has the focus.
+
 @item tui-border
 Control the styling of the TUI border.  Note that, unlike other
 styling options, only the color of the border can be controlled via
@@ -28646,50 +28678,21 @@ styling options, only the color of the border can be controlled via
 controls to set the border's intensity predated the addition of
 general styling to @value{GDBN}.  @xref{TUI Configuration}.
 
-@item tui-active-border
-Control the styling of the active TUI border; that is, the TUI window
-that has the focus.
-
-@item disassembler comment
-Control the styling of comments in the disassembler output.  These are
-managed with the @code{set style disassembler comment} family of
-commands.  This style is only used when @value{GDBN} is styling using
-its builtin disassembler library
-(@pxref{style_disassembler_enabled,,@kbd{set style disassembler
-enabled}}).  By default, this style's intensity is dim, and its
-foreground color is white.
-
-@item disassembler immediate
-Control the styling of numeric operands in the disassembler output.
-These are managed with the @code{set style disassembler immediate}
-family of commands.  This style is not used for instruction operands
-that represent addresses, in that case the @samp{disassembler address}
-style is used.  This style is only used when @value{GDBN} is styling
-using its builtin disassembler library.  By default, this style's
-foreground color is blue.
-
-@item disassembler address
-Control the styling of address operands in the disassembler output.
-This is an alias for the @samp{address} style.
-
-@item disassembler symbol
-Control the styling of symbol names in the disassembler output.  This
-is an alias for the @samp{function} style.
+@item variable
+Control the styling of variable names.  These are managed with the
+@code{set style variable} family of commands.  By default, this style's
+foreground color is cyan.
 
-@item disassembler mnemonic
-Control the styling of instruction mnemonics in the disassembler
-output.  These are managed with the @code{set style disassembler
-mnemonic} family of commands.  This style is also used for assembler
-directives, e.g.@: @code{.byte}, @code{.word}, etc.  This style is
-only used when @value{GDBN} is styling using its builtin disassembler
-library.  By default, this style's foreground color is green.
+@item version
+Control the styling of @value{GDBN}'s version number text.  By
+default, this style's foreground color is magenta and it has bold
+intensity.  The version number is displayed in two places, the output
+of @command{show version}, and when @value{GDBN} starts up.
 
-@item disassembler register
-Control the styling of register operands in the disassembler output.
-These are managed with the @code{set style disassembler register}
-family of commands.  This style is only used when @value{GDBN} is
-styling using its builtin disassembler library.  By default, this style's
-foreground color is red.
+In order to control how @value{GDBN} styles the version number at
+startup, add the @code{set style version} family of commands to the
+early initialization command file (@pxref{Initialization
+Files}).
 
 @end table
 

base-commit: 45460a213097f19fb10bc5798f127d460f94b00a
-- 
2.56.0


             reply	other threads:[~2026-11-09 14:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09 14:35 Tom Tromey [this message]
2026-11-09 15:03 ` Eli Zaretskii
2026-11-09 16:30   ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261109143504.367171-1-tromey@adacore.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox