From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 1355F3858CDA for ; Sat, 20 Aug 2022 12:43:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1355F3858CDA Received: from fencepost.gnu.org ([2001:470:142:3::e]:37686) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPNpM-00073E-1l; Sat, 20 Aug 2022 08:43:48 -0400 Received: from [87.69.77.57] (port=4368 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPNpL-0007sj-Gr; Sat, 20 Aug 2022 08:43:47 -0400 Date: Sat, 20 Aug 2022 15:43:47 +0300 Message-Id: <835yindr0c.fsf@gnu.org> From: Eli Zaretskii To: Andrei Pikas Cc: gdb-patches@sourceware.org, gdb@mail.api.win In-Reply-To: <20220820121917.11438-1-gdb@mail.api.win> (message from Andrei Pikas on Sat, 20 Aug 2022 15:19:17 +0300) Subject: Re: [PATCH v2] Add an option with a color type. References: <87zgg2ydhx.fsf@redhat.com> <20220820121917.11438-1-gdb@mail.api.win> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2022 12:43:51 -0000 > From: Andrei Pikas > Date: Sat, 20 Aug 2022 15:19:17 +0300 > Cc: Andrei Pikas > > Colors can be specified as name of one of the basic colors "none", "black", > "white", etc., as a number up to 255, or as RGB hexadecimal tripplet #RRGGBB. I might be missing something, but where's the correspondence between the "color number" and the colors, how do we check that TrueColor is supported by the terminal, and what will happen if they aren't? > diff --git a/gdb/NEWS b/gdb/NEWS > index d2efe2a0a58..c9d25890ed9 100644 > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -55,6 +55,9 @@ > Python Pygments is still used. For supported targets, libopcodes > styling is used by default. > > + "set style" commands now supports numeric format for basic colors > + from 0 to 255 and #RRGGBB format for TrueColor. > + > * New commands > > maintenance set ignore-prologue-end-flag on|off > @@ -170,6 +173,16 @@ GNU/Linux/LoongArch (gdbserver) loongarch*-*-linux* > can be used to request a shorter representation of a value, the > way that 'set print frame-arguments scalars' does. > > + ** New constant gdb.PARAM_COLOR represents color type of a > + gdb.Parameter.value. Parameter's value is either an integer > + from 0 to 255 or string with color name or #RRGGBB hex triplet. > + > +* Guile API > + > + ** New constant PARAM_COLOR represents color type of a value > + of a object. Parameter's value is either an integer > + from 0 to 255 or string with color name or #RRGGBB hex triplet. > + > * New features in the GDB remote stub, GDBserver This part is okay (assuming that the implementation is accepted). > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -26605,16 +26605,18 @@ For example, the style of file names can be controlled using the > > @table @code > @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{blue}, @samp{magenta}, @samp{cyan}, > -and@samp{white}. > +Set the background to @var{color}. @var{color} can be a name of a basic color, > +number from 0 to 255 or a hexadecimal RGB triplet in #RRGGBB format. Valid "#RRGGBB" should be in @samp, I think (here and elsewhere in the manual). > +color names are @samp{none} (meaning the terminal's default color), > +@samp{black}, @samp{red}, @samp{green}, @samp{yellow}, @samp{blue}, > +@samp{magenta}, @samp{cyan}, and @samp{white}. This should explain how are the numbers 0..255 related to colors, and should also mention TrueColor (if that is how the RRGGBB triplets are interpreted). Thanks.