From patchwork Sat Jun 1 21:23:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Waroquiers X-Patchwork-Id: 32965 Received: (qmail 80331 invoked by alias); 1 Jun 2019 21:23:54 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 80259 invoked by uid 89); 1 Jun 2019 21:23:53 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy=@value, displays, GDBN, gdbn X-HELO: mailsec102.isp.belgacom.be Received: from mailsec102.isp.belgacom.be (HELO mailsec102.isp.belgacom.be) (195.238.20.98) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 01 Jun 2019 21:23:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skynet.be; i=@skynet.be; q=dns/txt; s=securemail; t=1559424231; x=1590960231; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=T78+7e9We6g3maZ8SSCU47hwYgeO/xNF1f736b5mQ98=; b=LH9AZaUMSSE02vGnQ0HiDff80y2JDnPfDXLfGqGqNNJFkKjUP8JzCOZP 06a3XsODlJ8njOUkUnqo0NgPIiOCOg==; Received: from 161.32-242-81.adsl-dyn.isp.belgacom.be (HELO md.home) ([81.242.32.161]) by relay.skynet.be with ESMTP/TLS/DHE-RSA-AES128-GCM-SHA256; 01 Jun 2019 23:23:40 +0200 From: Philippe Waroquiers To: gdb-patches@sourceware.org Cc: Philippe Waroquiers Subject: [RFAv2 4/4] Document in NEWS and gdb.texinfo the "help", "apropos" and "show style" changes. Date: Sat, 1 Jun 2019 23:23:31 +0200 Message-Id: <20190601212331.12085-5-philippe.waroquiers@skynet.be> In-Reply-To: <20190601212331.12085-1-philippe.waroquiers@skynet.be> References: <20190601212331.12085-1-philippe.waroquiers@skynet.be> MIME-Version: 1.0 X-IsSubscribed: yes --- gdb/ChangeLog | 5 +++++ gdb/NEWS | 30 ++++++++++++++++++++++++++ gdb/doc/ChangeLog | 6 ++++++ gdb/doc/gdb.texinfo | 52 +++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 91 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e81db988f9..72ec3ff54d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -7142,3 +7142,8 @@ End: (print_help_for_command): Style the command name using title style. * cli/cli-cmds.c (apropos_command): Parse optional -v flag. (_initialize_cli_cmds): Describe -v in apropos_command help. + +2019-05-31 Philippe Waroquiers + + * NEWS: Mention the new set|show style [title|highlight]. + Mention changes to "show style", "help" and "apropos". diff --git a/gdb/NEWS b/gdb/NEWS index be1ec4eb41..41f4f7a852 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -69,6 +69,36 @@ set logging debugredirect [on|off] By default, GDB debug output will go to both the terminal and the logfile. Set if you want debug output to go only to the log file. +set style title foreground COLOR +set style title background COLOR +set style title intensity VALUE + Control the styling of titles. + +set style highlight foreground COLOR +set style highlight background COLOR +set style highlight intensity VALUE + Control the styling of highlightings. + +* Changed commands + +help + The "help" command uses the title style to enhance the + readibility of its output by styling the classes and + command names. + +apropos [-v] REGEXP + Similarly to "help", the "apropos" command also uses the + title style for the command names. "apropos" accepts now + a flag "-v" (verbose) to show the full documentation + of matching commands and to use the highlight style to mark + the documentation parts matching REGEXP. + +show style + The "show style" and its subcommands are now styling + a style name in their output using its own style, to help + the user visualize the different styles. + + * New MI commands -complete diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 00388244fd..025995deea 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -12875,3 +12875,9 @@ fill-column: 74 version-control: never coding: utf-8 End: + +2019-05-31 Philippe Waroquiers + + * gdb.texinfo (Help): Document the new -v apropos flag. + (Output Styling): Document the style name styling done by "show style". + Document the new title and highlight styles. diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 79c22d0774..d9cc667ce7 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -1895,10 +1895,13 @@ With a command name as @code{help} argument, @value{GDBN} displays a short paragraph on how to use that command. @kindex apropos -@item apropos @var{args} +@item apropos [-v] @var{regexp} The @code{apropos} command searches through all of the @value{GDBN} commands, and their documentation, for the regular expression specified in -@var{args}. It prints out all matches found. For example: +@var{args}. It prints out all matches found. The optional flag @samp{-v}, +which stands for @samp{verbose}, indicates to output the full documentation +of the matching commands and highlight the parts of the documentation +matching @var{regexp}. For example: @smallexample apropos alias @@ -1917,6 +1920,29 @@ delete -- Delete some breakpoints or auto-display expressions @c @end group @end smallexample +@noindent +while + +@smallexample +apropos -v cut.*thread apply +@end smallexample + +@noindent +results in the below output, where @samp{cut for 'thread apply} +is highlighted if styling is enabled. + +@smallexample +@c @group +taas -- Apply a command to all threads (ignoring errors and empty output). +Usage: taas COMMAND +shortcut for 'thread apply all -s COMMAND' + +tfaas -- Apply a command to all frames of all threads (ignoring errors and empty output). +Usage: tfaas COMMAND +shortcut for 'thread apply all -s frame apply all -s COMMAND' +@c @end group +@end smallexample + @kindex complete @item complete @var{args} The @code{complete @var{args}} command lists all the possible completions @@ -24784,6 +24810,11 @@ Set the intensity to @var{value}. Valid intensities are @samp{normal} (the default), @samp{bold}, and @samp{dim}. @end table +The @code{show style} command and its subcommands are styling +a style name in their output using its own style. +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 filename @@ -24804,6 +24835,23 @@ foreground color is cyan. 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. + +@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 readibility of large output. For example, the commands +@command{apropos} and @command{help} are using the title style +for the command names. + +@item highlight +Control the styling of highlightings. These are managed with the +@code{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 @command{apropos -v REGEXP} uses the highlight style to +mark the documentation parts matching @var{regexp}. + @end table @node Numbers