]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Reuse "title" style for list headers
authorTom Tromey <tom@tromey.com>
Thu, 3 Oct 2024 22:48:45 +0000 (16:48 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 13 Dec 2024 03:18:23 +0000 (20:18 -0700)
This patch reuses the "title" style for titles -- in particular the
header line of a list display.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Reviewed-By: Keith Seitz <keiths@redhat.com>
Approved-By: Andrew Burgess <aburgess@redhat.com>
gdb/NEWS
gdb/cli-out.c
gdb/doc/gdb.texinfo
gdb/testsuite/gdb.base/style.exp

index 49a3bc10cf1875e22505fd205b4fdc707b6e32fb..814cccbe716c6c3154095c4147755455010cd021 100644 (file)
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -124,6 +124,13 @@ set style command background COLOR
 set style command intensity VALUE
   Control the styling of GDB commands when displayed by GDB.
 
+set style title foreground COLOR
+set style title background COLOR
+set style title intensity VALUE
+  This style now applies to the header line of lists, for example the
+  first line of the output of "info breakpoints".  Previous uses of
+  this style have been replaced with the new "command" style.
+
 set warn-language-frame-mismatch [on|off]
 show warn-language-frame-mismatch
   Control the warning that is emitted when specifying a language that
index d8a542d1b9be1416b87754737e8d64cc4dcf9e08..afa73eba2aed645cdae3eee8bedf2da7a2f00edd 100644 (file)
@@ -73,7 +73,7 @@ cli_ui_out::do_table_header (int width, ui_align alignment,
     return;
 
   do_field_string (0, width, alignment, 0, col_hdr.c_str (),
-                  ui_file_style ());
+                  title_style.style ());
 }
 
 /* Mark beginning of a list */
index 0254b5aa815e3d6fe97d97d79879e13b0ef0cf02..aaa0ff672e566d2366b6510d76164ec727d81f0c 100644 (file)
@@ -27915,10 +27915,9 @@ 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.  Commands are using the title style to improve
-the readability of large output.  For example, the commands
-@command{apropos} and @command{help} are using the title style
-for the command names.
+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
index 83e0faeebd07428b08ea311b4b6193547dd350a1..628c6b80570882ed5333fe0bab4d117f161f92d0 100644 (file)
@@ -111,7 +111,8 @@ proc run_style_tests { } {
            [multi_line \
                 "#0\\s+$main_expr\\s+\\($arg_expr=$decimal,\\s+$arg_expr=$hex.*\\)\\s+at\\s+$file_expr" \
                 "$line_expr\\s+.*return.* break here .*"]
-       gdb_test "info breakpoints" "$main_expr at $file_expr.*"
+       gdb_test "info breakpoints" \
+           ".*[limited_style What title].*$main_expr at $file_expr.*"
 
        gdb_test_no_output "set style sources off"
        gdb_test "frame" \