From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Pd+sLxvXAGPyYSoAWB0awg (envelope-from ) for ; Sat, 20 Aug 2022 08:44:11 -0400 Received: by simark.ca (Postfix, from userid 112) id AF9101E4A7; Sat, 20 Aug 2022 08:44:11 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=X8lcLoYq; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id DE1771E222 for ; Sat, 20 Aug 2022 08:44:10 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 75FDA3858294 for ; Sat, 20 Aug 2022 12:44:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 75FDA3858294 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1660999449; bh=29fUk/i4EvvXTZi1Hzz7L6kh3stVjB27KFDPP/EHrr4=; h=Date:To:In-Reply-To:Subject:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=X8lcLoYqS3gguBBj3PWdUaXW/b+5zEWYqNm1+n6Agh2ZojN685w5Y/9DNLaM+Zlff oGX3JovmMn66/89ypPGO0WqfzmUhcKu4Q14WUpGx/p3JPPmd4VGG8f29HC0ZZjCZRS 7c5nl1yF0HHNCkNpcTwQMyz8HJyWuncVBe7oY9uc= 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> To: Andrei Pikas 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-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: , From: Eli Zaretskii via Gdb-patches Reply-To: Eli Zaretskii Cc: gdb@mail.api.win, gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" > 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.