public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug tui/25956] New: Hardcoded colors remain
@ 2020-05-09 10:22 jengelh at inai dot de
  2020-06-06 15:01 ` [Bug tui/25956] " tromey at sourceware dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jengelh at inai dot de @ 2020-05-09 10:22 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=25956

            Bug ID: 25956
           Summary: Hardcoded colors remain
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: tui
          Assignee: unassigned at sourceware dot org
          Reporter: jengelh at inai dot de
  Target Milestone: ---

Some colors are still hardcoded. One place I find is gdb-8.3.1/gdb/top.c:1284.

  ui_file_style style;
  if (interactive)
    {
      ui_file_style nstyle = { ui_file_style::MAGENTA, ui_file_style::NONE,
                               ui_file_style::BOLD };
      style = nstyle;
    }
  fprintf_styled (stream, style, "GNU gdb %s%s\n", PKGVERSION, version);

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug tui/25956] Hardcoded colors remain
  2020-05-09 10:22 [Bug tui/25956] New: Hardcoded colors remain jengelh at inai dot de
@ 2020-06-06 15:01 ` tromey at sourceware dot org
  2020-08-09 18:55 ` [Bug cli/25956] " tromey at sourceware dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: tromey at sourceware dot org @ 2020-06-06 15:01 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=25956

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
See https://sourceware.org/pipermail/gdb-patches/2020-April/167355.html

I think this is the only hard-coded color?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug cli/25956] Hardcoded colors remain
  2020-05-09 10:22 [Bug tui/25956] New: Hardcoded colors remain jengelh at inai dot de
  2020-06-06 15:01 ` [Bug tui/25956] " tromey at sourceware dot org
@ 2020-08-09 18:55 ` tromey at sourceware dot org
  2021-01-22 19:09 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: tromey at sourceware dot org @ 2020-08-09 18:55 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=25956

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
          Component|tui                         |cli
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2020-08-09
           Assignee|unassigned at sourceware dot org   |tromey at sourceware dot org

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
Not really a TUI bug.
I plan to land that fix sometime after 10.1 branches.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug cli/25956] Hardcoded colors remain
  2020-05-09 10:22 [Bug tui/25956] New: Hardcoded colors remain jengelh at inai dot de
  2020-06-06 15:01 ` [Bug tui/25956] " tromey at sourceware dot org
  2020-08-09 18:55 ` [Bug cli/25956] " tromey at sourceware dot org
@ 2021-01-22 19:09 ` cvs-commit at gcc dot gnu.org
  2021-04-15  9:34 ` cvs-commit at gcc dot gnu.org
  2021-04-15 20:11 ` tromey at sourceware dot org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-22 19:09 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=25956

--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Andrew Burgess <aburgess@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9d2d8a16e1ce033d6b7956d4b4f37961705bb5cf

commit 9d2d8a16e1ce033d6b7956d4b4f37961705bb5cf
Author: Andrew Burgess <andrew.burgess@embecosm.com>
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 commands.
            * cli/cli-style.h (cli_style_option): Add intensity parameter.
            (version_style): Declare.
            * top.c (print_gdb_version): Use version_stype, and styled_string
            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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug cli/25956] Hardcoded colors remain
  2020-05-09 10:22 [Bug tui/25956] New: Hardcoded colors remain jengelh at inai dot de
                   ` (2 preceding siblings ...)
  2021-01-22 19:09 ` cvs-commit at gcc dot gnu.org
@ 2021-04-15  9:34 ` cvs-commit at gcc dot gnu.org
  2021-04-15 20:11 ` tromey at sourceware dot org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-15  9:34 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=25956

--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Andrew Burgess <aburgess@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=92e4e97a9f569bf23b0f74479f32280c1f24cc6b

commit 92e4e97a9f569bf23b0f74479f32280c1f24cc6b
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Date:   Fri Sep 25 16:28:05 2020 +0100

    gdb: process early initialization files and command line options

    Adds the ability to process commands at a new phase during GDB's
    startup.  This phase is earlier than the current initialisation file
    processing, before GDB has produced any output.

    The number of commands that can be processed at this early stage will
    be limited, and it is expected that the only commands that would be
    processed at this stage will relate to some of the fundamentals of how
    GDB starts up.

    Currently the only commands that it makes sense to add to this early
    initialization file are those like 'set style version ....' as the
    version string is displayed during startup before the standard
    initialization files are parsed.  As such this commit fully resolved
    bug cli/25956.

    This commit adds a mechanism to execute these early initialization
    files from a users HOME directory, as well as some corresponding
    command line flags for GDB.

    The early initialization files that GDB will currently check for are
    ~/.config/gdb/gdbearlyinit (on Linux like systems) or ~/.gdbearlyinit
    if the former is not found.

    The output of 'gdb --help' has been extended to include a list of the
    early initialization files being processed.

    gdb/ChangeLog:

            PR cli/25956
            * NEWS: Mention new early init files and command line options.
            * config.in: Regenerate.
            * configure: Regenerate.
            * configure.ac: Define GDBEARLYINIT.
            * main.c (get_earlyinit_files): New function.
            (enum cmdarg_kind): Add CMDARG_EARLYINIT_FILE and
            CMDARG_EARLYINIT_COMMAND.
            (captured_main_1): Add support for new command line flags, and for
            processing startup files.
            (print_gdb_help): Include startup files in the output.

    gdb/doc/ChangeLog:

            PR cli/25956
            * gdb.texinfo (File Options): Mention new command line options.
            (Startup): Discuss when early init files are processed.
            (Initialization Files): Add description of early init files.
            (Output Styling): Update description of 'version' style.
            (gdb man): Mention early init files.

    gdb/testsuite/ChangeLog:

            PR cli/25956
            * gdb.base/early-init-file.c: New file.
            * gdb.base/early-init-file.exp: New file.
            * lib/gdb-utils.exp (style): Handle style 'none'.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug cli/25956] Hardcoded colors remain
  2020-05-09 10:22 [Bug tui/25956] New: Hardcoded colors remain jengelh at inai dot de
                   ` (3 preceding siblings ...)
  2021-04-15  9:34 ` cvs-commit at gcc dot gnu.org
@ 2021-04-15 20:11 ` tromey at sourceware dot org
  4 siblings, 0 replies; 6+ messages in thread
From: tromey at sourceware dot org @ 2021-04-15 20:11 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=25956

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.1
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #5 from Tom Tromey <tromey at sourceware dot org> ---
I think this is fixed now.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-04-15 20:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-09 10:22 [Bug tui/25956] New: Hardcoded colors remain jengelh at inai dot de
2020-06-06 15:01 ` [Bug tui/25956] " tromey at sourceware dot org
2020-08-09 18:55 ` [Bug cli/25956] " tromey at sourceware dot org
2021-01-22 19:09 ` cvs-commit at gcc dot gnu.org
2021-04-15  9:34 ` cvs-commit at gcc dot gnu.org
2021-04-15 20:11 ` tromey at sourceware dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).