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 ESMTP id F2A89385DC00 for ; Sat, 4 Apr 2020 16:22:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F2A89385DC00 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=eliz@gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]:45934) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jKlYX-0003fJ-II; Sat, 04 Apr 2020 12:22:01 -0400 Received: from [176.228.60.248] (port=2450 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jKlYW-0001jK-Hu; Sat, 04 Apr 2020 12:22:01 -0400 Date: Sat, 04 Apr 2020 19:21:50 +0300 Message-Id: <831rp3uspt.fsf@gnu.org> From: Eli Zaretskii To: Tom Tromey Cc: gdb-patches@sourceware.org In-Reply-To: <20200404145422.19917-6-tom@tromey.com> (message from Tom Tromey on Sat, 4 Apr 2020 08:54:21 -0600) Subject: Re: [RFC 5/6] Let the user control the startup style References: <20200404145422.19917-1-tom@tromey.com> <20200404145422.19917-6-tom@tromey.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Status: No, score=-20.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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, 04 Apr 2020 16:22:03 -0000 > From: Tom Tromey > Date: Sat, 4 Apr 2020 08:54:21 -0600 > Cc: Tom Tromey > > index b376737e409..bb54c738281 100644 > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -60,6 +60,13 @@ show exec-file-mismatch -- Show exec-file-mismatch handling (ask|warn|off). > whether to load the process executable file; if 'warn', just display > a warning; if 'off', don't attempt to detect a mismatch. > > +set style startup foreground COLOR > +set style startup background COLOR > +set style startup intensity VALUE > + Control the styling of startup text. This saves the setting into > + a special configuration file, so that it can be read during startup > + and applied. This part is OK. > diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo > index 385c832f222..f860b238ff8 100644 > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -25573,6 +25573,21 @@ 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 startup > +Control the styling of some text that is printed at startup. These > +are managed with the @code{set style startup} family of commands. By > +default, this style's foreground color is magenta and it has bold > +intensity. Changing these settings will cause them to automatically > +be saved in a special configuration file, which is read by > +@value{GDBN} early in its startup. > + > +The default value for this directory depends on the host platform. On > +most systems, the index is cached in the @file{gdb} subdirectory of > +the directory pointed to by the @env{XDG_CONFIG_HOME} environment > +variable, if it is defined, else in the @file{.config/gdb} subdirectory > +of your home directory. However, on some systems, the default may > +differ according to local convention. This is also OK. But I wonder: we have ~/.gdbinit and ~/config/gdb (or, if XDG_CONFIG_HOME is set, some utterly different directory) for the new file? Sounds confusing. Also, I'm told that XDG_CONFIG_HOME is ephemeral: it is set anew each session, so the user could end up having his/her setting saved in a file he/she will not see the next time they log in. Can that happen? Thanks.