From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1B9D0398E48E; Fri, 22 Jan 2021 19:09:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1B9D0398E48E From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug cli/25956] Hardcoded colors remain Date: Fri, 22 Jan 2021 19:09:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: cli X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: tromey at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2021 19:09:52 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25956 --- Comment #3 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Andrew Burgess : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D9d2d8a16e1ce= 033d6b7956d4b4f37961705bb5cf commit 9d2d8a16e1ce033d6b7956d4b4f37961705bb5cf Author: Andrew Burgess Date: Wed Jan 13 20:08:51 2021 +0000 gdb: add new version style This commit adds a new 'version' style, which replaces the hard coded styling currently used for GDB's version string. GDB's version number is displayed: 1. In the output of 'show version', and 2. When GDB starts up (without the --quiet option). This new style can only ever affect the first of these two cases as the second case is printed before GDB has processed any initialization files, or processed any GDB commands passed on the command line. However, because the first case exists I think this commit makes sense, it means the style is no longer hard coded into GDB, and we can add some tests that the style can be enabled/disabled correctly. This commit is an alternative to a patch Tom posted here: https://sourceware.org/pipermail/gdb-patches/2020-June/169820.html I've used the style name 'version' instead of 'startup' to reflect what the style is actually used for. If other parts of the startup text end up being highlighted I imagine they would get their own styles based on what is being highlighted. I feel this is more inline with the other style names that are already in use within GDB. I also decoupled adding this style from the idea of startup options, and the possibility of auto-saving startup options. Those ideas can be explored in later patches. This commit should probably be considered only a partial solution to issue PR cli/25956. The colours of the style are no longer hard coded, however, it is still impossible to change the styling of the version string displayed during startup, so in one sense, the styling of that string is still "hard coded". A later patch will hopefully extend GDB to allow it to adjust the version styling before the initial version string is printed. gdb/ChangeLog: PR cli/25956 * cli/cli-style.c: Add 'cli/cli-setshow.h' include. (version_style): Define. (cli_style_option::cli_style_option): Add intensity parameter, = and use as appropriate. (_initialize_cli_style): Register version style set/show comman= ds. * cli/cli-style.h (cli_style_option): Add intensity parameter. (version_style): Declare. * top.c (print_gdb_version): Use version_stype, and styled_stri= ng to print the GDB version string. gdb/doc/ChangeLog: PR cli/25956 * gdb.texinfo (Output Styling): Document version style. gdb/testsuite/ChangeLog: PR cli/25956 * gdb.base/style.exp (run_style_tests): Add version string test. (test_startup_version_string): Use version style name. * lib/gdb-utils.exp (style): Handle version style name. --=20 You are receiving this mail because: You are on the CC list for the bug.=