diff options
author | Tom Tromey <tom@tromey.com> | 2024-10-03 16:48:45 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2024-12-12 20:18:23 -0700 |
commit | 27e69fa7e921760de0736355b9d8b7d1f3901486 (patch) | |
tree | dd0328997b0741cec21cebd7a299b141903af518 /gdb | |
parent | b5f91cd4dfbc1ef8e2ff7ce198d0f4357e20638c (diff) | |
download | binutils-27e69fa7e921760de0736355b9d8b7d1f3901486.zip binutils-27e69fa7e921760de0736355b9d8b7d1f3901486.tar.gz binutils-27e69fa7e921760de0736355b9d8b7d1f3901486.tar.bz2 |
Reuse "title" style for list headers
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>
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/NEWS | 7 | ||||
-rw-r--r-- | gdb/cli-out.c | 2 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/style.exp | 3 |
4 files changed, 13 insertions, 6 deletions
@@ -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 diff --git a/gdb/cli-out.c b/gdb/cli-out.c index d8a542d..afa73eb 100644 --- a/gdb/cli-out.c +++ b/gdb/cli-out.c @@ -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 */ diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 0254b5a..aaa0ff6 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -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 diff --git a/gdb/testsuite/gdb.base/style.exp b/gdb/testsuite/gdb.base/style.exp index 83e0fae..628c6b8 100644 --- a/gdb/testsuite/gdb.base/style.exp +++ b/gdb/testsuite/gdb.base/style.exp @@ -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" \ |