)]}'
{
  "commit": "9d2d8a16e1ce033d6b7956d4b4f37961705bb5cf",
  "tree": "8125bc0637b54354f56ba62a74e3dc46bb3b8149",
  "parents": [
    "e7b430724d89288f06926999811c71400e0d1531"
  ],
  "author": {
    "name": "Andrew Burgess",
    "email": "andrew.burgess@embecosm.com",
    "time": "Wed Jan 13 20:08:51 2021 +0000"
  },
  "committer": {
    "name": "Andrew Burgess",
    "email": "andrew.burgess@embecosm.com",
    "time": "Fri Jan 22 19:09:31 2021 +0000"
  },
  "message": "gdb: add new version style\n\nThis commit adds a new \u0027version\u0027 style, which replaces the hard coded\nstyling currently used for GDB\u0027s version string.  GDB\u0027s version number\nis displayed:\n\n  1. In the output of \u0027show version\u0027, and\n\n  2. When GDB starts up (without the --quiet option).\n\nThis new style can only ever affect the first of these two cases as\nthe second case is printed before GDB has processed any initialization\nfiles, or processed any GDB commands passed on the command line.\n\nHowever, because the first case exists I think this commit makes\nsense, it means the style is no longer hard coded into GDB, and we can\nadd some tests that the style can be enabled/disabled correctly.\n\nThis commit is an alternative to a patch Tom posted here:\n\n  https://sourceware.org/pipermail/gdb-patches/2020-June/169820.html\n\nI\u0027ve used the style name \u0027version\u0027 instead of \u0027startup\u0027 to reflect\nwhat the style is actually used for.  If other parts of the startup\ntext end up being highlighted I imagine they would get their own\nstyles based on what is being highlighted.  I feel this is more inline\nwith the other style names that are already in use within GDB.\n\nI also decoupled adding this style from the idea of startup options,\nand the possibility of auto-saving startup options.  Those ideas can\nbe explored in later patches.\n\nThis commit should probably be considered only a partial solution to\nissue PR cli/25956.  The colours of the style are no longer hard\ncoded, however, it is still impossible to change the styling of the\nversion string displayed during startup, so in one sense, the styling\nof that string is still \"hard coded\".  A later patch will hopefully\nextend GDB to allow it to adjust the version styling before the\ninitial version string is printed.\n\ngdb/ChangeLog:\n\n\tPR cli/25956\n\t* cli/cli-style.c: Add \u0027cli/cli-setshow.h\u0027 include.\n\t(version_style): Define.\n\t(cli_style_option::cli_style_option): Add intensity parameter, and\n\tuse as appropriate.\n\t(_initialize_cli_style): Register version style set/show commands.\n\t* cli/cli-style.h (cli_style_option): Add intensity parameter.\n\t(version_style): Declare.\n\t* top.c (print_gdb_version): Use version_stype, and styled_string\n\tto print the GDB version string.\n\ngdb/doc/ChangeLog:\n\n\tPR cli/25956\n\t* gdb.texinfo (Output Styling): Document version style.\n\ngdb/testsuite/ChangeLog:\n\n\tPR cli/25956\n\t* gdb.base/style.exp (run_style_tests): Add version string test.\n\t(test_startup_version_string): Use version style name.\n\t* lib/gdb-utils.exp (style): Handle version style name.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "18368305715f8ea1e74aee177ca8df0139597c69",
      "old_mode": 33188,
      "old_path": "gdb/ChangeLog",
      "new_id": "bbb00e4dfd0159e64c44be1ce3d16aaf229ddfa7",
      "new_mode": 33188,
      "new_path": "gdb/ChangeLog"
    },
    {
      "type": "modify",
      "old_id": "66702862efb283a238e9f5ef80d6b473cae4c108",
      "old_mode": 33188,
      "old_path": "gdb/NEWS",
      "new_id": "d2ed28857b0c05c5fe1f4e7cd54f5b24641e396b",
      "new_mode": 33188,
      "new_path": "gdb/NEWS"
    },
    {
      "type": "modify",
      "old_id": "cbedd30ea74d0adf97fb0238867b910392e15cc0",
      "old_mode": 33188,
      "old_path": "gdb/cli/cli-style.c",
      "new_id": "8b4b6b24cda4396fdef7aaa66f82403a437b10c4",
      "new_mode": 33188,
      "new_path": "gdb/cli/cli-style.c"
    },
    {
      "type": "modify",
      "old_id": "cd51bf4aa944b75e555301d5f329e630854672d2",
      "old_mode": 33188,
      "old_path": "gdb/cli/cli-style.h",
      "new_id": "187e1d07ce7dbc12d8dd8c6a6bee626af2c9a773",
      "new_mode": 33188,
      "new_path": "gdb/cli/cli-style.h"
    },
    {
      "type": "modify",
      "old_id": "be37ac444ec80eee528a527bcc29bcba09baefe7",
      "old_mode": 33188,
      "old_path": "gdb/doc/ChangeLog",
      "new_id": "8f0ae35cf7ed023319d264b96ac579c6811d463a",
      "new_mode": 33188,
      "new_path": "gdb/doc/ChangeLog"
    },
    {
      "type": "modify",
      "old_id": "f18b1c152241bbb5c9040acd92990b93253189ba",
      "old_mode": 33188,
      "old_path": "gdb/doc/gdb.texinfo",
      "new_id": "3e3c38dea3afacbc230ea5d612c80fe0fb888e70",
      "new_mode": 33188,
      "new_path": "gdb/doc/gdb.texinfo"
    },
    {
      "type": "modify",
      "old_id": "6537bba41b3c86e6ee1f7685aed5e42b5cef8529",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/ChangeLog",
      "new_id": "d6fa7402aa82c0bff5f74ee608d647d7e2b662ce",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/ChangeLog"
    },
    {
      "type": "modify",
      "old_id": "08cd63546bd3f7df54c4dfd078717cae5078c229",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.base/style.exp",
      "new_id": "0754c9daa49d799dfcfdae88563a9fde34c6a547",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.base/style.exp"
    },
    {
      "type": "modify",
      "old_id": "000e3800cd90d9dc7b8295c583842b5a697a0f6a",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/lib/gdb-utils.exp",
      "new_id": "ad7d2884aae96c534ff54fc0b8bffb37aba865e8",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/lib/gdb-utils.exp"
    },
    {
      "type": "modify",
      "old_id": "15fbd6d27e68b4244737a1df0be333378f63298a",
      "old_mode": 33188,
      "old_path": "gdb/top.c",
      "new_id": "08c4742251467380a2120943adc0dc413eaa7f57",
      "new_mode": 33188,
      "new_path": "gdb/top.c"
    }
  ]
}
