From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28895 invoked by alias); 28 Nov 2018 00:14:55 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 28521 invoked by uid 89); 28 Nov 2018 00:14:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Various, Numbers, capable, Screen X-HELO: gateway21.websitewelcome.com Received: from gateway21.websitewelcome.com (HELO gateway21.websitewelcome.com) (192.185.45.212) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 28 Nov 2018 00:14:43 +0000 Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway21.websitewelcome.com (Postfix) with ESMTP id 62BB2400C7ACB for ; Tue, 27 Nov 2018 18:14:42 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id RnV4gtWSkRPojRnV4g2Caf; Tue, 27 Nov 2018 18:14:42 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=vCdjCb8A+t9OlKCvyV2aFGbj5NatqBSn32pYErgyXI8=; b=yCcLJDqlc8kyStLd58AVsldHx2 bzvvuF1RbtwqfncfjJBNtBou4dCwE4k9nU2H2tBylGk3MdvfWnJhjjh/UWIyBGEYO+cD4EURURx6G MHVp4ppoqI9xQBRhrFe5w2D5I; Received: from 97-122-190-66.hlrn.qwest.net ([97.122.190.66]:33804 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1gRnV4-004MMp-5v; Tue, 27 Nov 2018 18:14:42 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 16/16] Document the "set style" commands Date: Wed, 28 Nov 2018 00:16:00 -0000 Message-Id: <20181128001435.12703-17-tom@tromey.com> In-Reply-To: <20181128001435.12703-1-tom@tromey.com> References: <20181128001435.12703-1-tom@tromey.com> X-SW-Source: 2018-11/txt/msg00504.txt.bz2 This documents the new "set style" commands. gdb/ChangeLog 2018-11-27 Tom Tromey * NEWS: Mention terminal styling. gdb/doc/ChangeLog 2018-11-27 Tom Tromey * gdb.texinfo (Output Styling): New node. --- gdb/ChangeLog | 4 +++ gdb/NEWS | 30 +++++++++++++++++++ gdb/doc/ChangeLog | 4 +++ gdb/doc/gdb.texinfo | 72 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 110 insertions(+) diff --git a/gdb/NEWS b/gdb/NEWS index 9ecbb83d99..a5e677bc84 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -40,6 +40,11 @@ * The RISC-V target now supports target descriptions. +* Terminal styling is now available for the CLI and the TUI. GNU + Source Highlight can additionally be used to provide styling of + source code snippets. See the "set style" commands, below, for more + information. + * New targets NXP S12Z s12z-*-elf @@ -116,6 +121,31 @@ set tui tab-width NCHARS show tui tab-width NCHARS "set tui tab-width" replaces the "tabset" command, which has been deprecated. +set style enabled [on|off] +show style enabled + Enable or disable terminal styling. Styling is enabled by default + on most hosts. + +set style filename foreground COLOR +set style filename background COLOR +set style filename intensity VALUE + Control the styling of file names. + +set style function foreground COLOR +set style function background COLOR +set style function intensity VALUE + Control the styling of function names. + +set style variable foreground COLOR +set style variable background COLOR +set style variable intensity VALUE + Control the styling of variable names. + +set style address foreground COLOR +set style address background COLOR +set style address intensity VALUE + Control the styling of addresses. + * MI changes ** The '-data-disassemble' MI command now accepts an '-a' option to diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 7350d94573..4d7b085f35 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -24196,6 +24196,7 @@ described here. * Editing:: Command editing * Command History:: Command history * Screen Size:: Screen size +* Output Styling:: Output styling * Numbers:: Numbers * ABI:: Configuring the current ABI * Auto-loading:: Automatically loading associated files @@ -24503,6 +24504,77 @@ Options, -batch}) also automatically disables pagination. Show the current pagination mode. @end table +@node Output Styling +@section Output Styling +@cindex styling +@cindex colors + +@value{GDBN} can style its output on a capable terminal. This is +enabled by default on most systems. Various style settings are +available; and styles can also be disabled entirely. + +@table @code +@kindex set style enabled +@item set style enabled @samp{on|off} +Enable or disable all styling. The default is host-dependent, with +most hosts defaulting to @samp{on}. + +@kindex show style enabled +@item show style enabled +Show the current state of styling. +@end table + +Subcommands of @code{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 +@code{set style filename} group of commands: + +@table @code +@kindex set style filename background +@item set style filename background @var{color} +Set the background to @var{color}. Valid colors are @samp{none} +(meaning the terminal's default color), @samp{black}, @samp{red}, +@samp{green}, @samp{yellow}, @samp{vlue}, @samp{magenta}, @samp{cyan}, +and@samp{white}. + +@kindex set style filename foreground +@item set style filename foreground @var{color} +Set the foreground to @var{color}. Valid colors are @samp{none} +(meaning the terminal's default color), @samp{black}, @samp{red}, +@samp{green}, @samp{yellow}, @samp{vlue}, @samp{magenta}, @samp{cyan}, +and@samp{white}. + +@kindex set style filename intensity +@item set style filename intensity @var{value} +Set the intensity to @var{value}. Valid intensities are @samp{normal} +(the default), @samp{bold}, and @samp{dim}. +@end table + +The style-able objects are: +@table @code +@kindex set style filename +@item filename +Control the styling of file names. + +@kindex set style function +@item function +Control the styling of function names. These are managed with the +@code{set style function} family of commands. + +@kindex set style variable +@item variable +Control the styling of variable names. These are managed with the +@code{set style variable} family of commands. + +@kindex set style address +@item address +Control the styling of addresses. These are managed with the +@code{set style address} family of commands. +@end table + @node Numbers @section Numbers @cindex number representation -- 2.17.2