)]}'
{
  "commit": "d5214580a5f24cb1ca47f095e6d3554cb48eebbe",
  "tree": "18cb6c808a8ffc96a6538cf3d6178a9a2895be53",
  "parents": [
    "49e4d0cdca340fd4b4c6ed16cb76aff69d2c69fc"
  ],
  "author": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Wed Apr 23 14:51:17 2025 +0100"
  },
  "committer": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Sun Oct 05 13:47:18 2025 +0100"
  },
  "message": "gdb/python: new class gdb.StyleParameterSet\n\nAdd a new helper class gdb.StyleParameterSet.  This new class can be\nused to simplify creation of new style parameter sets.  A style\nparameter set is the \u0027foreground\u0027, \u0027background\u0027, and (optionally), the\n\u0027intensity\u0027 settings, all grouped under a single prefix command.\n\nAnd example usage is:\n\n  (gdb) python s \u003d gdb.StyleParameterSet(\"my-style\")\n  (gdb) show style my-style\n  style my-style background:  The \"my-style\" style background color is: none\n  style my-style foreground:  The \"my-style\" style foreground color is: none\n  style my-style intensity:  The \"my-style\" style display intensity is: normal\n  (gdb)\n\nHaving created a gdb.StyleParameterSet, the object itself can be used\nto access a named style corresponding to the setting group, like this:\n\n  (gdb) python print(s.style)\n  \u003cgdb.Style name\u003d\u0027my-style\u0027, fg\u003dnone, bg\u003dnone, intensity\u003dnormal\u003e\n  (gdb)\n\nOf course, having access to the gdb.Style makes it easy to change the\nsettings, or the settings can be adjusted via the normal CLI \u0027set\u0027\ncommands.\n\nAs gdb.StyleParameterSet manages a set of parameters, and the\ngdb.Parameter class uses Parameter.value as the attribute to read the\nparameter\u0027s value, there is also StyleParameterSet.value, but this is\njust an alias for StyleParameterSet.style, that is, it allows the\ngdb.Style object to be read and written too.\n\nIt is worth noting that this class only creates a single level of\nprefix command.  As an example GDB has style \u0027disassembler mnemonic\u0027,\nwhere the \u0027disassembler\u0027 part is a group of related styles.  If a user\nwanted to create:\n\n  style\n    my-style-group\n      style-1\n      style-2\n      style-3\n\nWhere each of \u0027style-1\u0027, \u0027style-2\u0027, and \u0027style-3\u0027 will have the full\nset of \u0027foreground\u0027, \u0027background\u0027, and \u0027intensity\u0027, then the\ngdb.StyleParameterSet can be used to create the \u0027style-N\u0027 part, but\nthe user will have to create the \u0027my-style-group\u0027 prefix themselves,\npossibly using gdb.ParameterPrefix, e.g.:\n\n  gdb.ParameterPrefix(\"style my-style-group\", gdb.COMMAND_NONE)\n  gdb.StyleParameterSet(\"my-style-group style-1\")\n  gdb.StyleParameterSet(\"my-style-group style-2\")\n  gdb.StyleParameterSet(\"my-style-group style-3\")\n\nReviewed-By: Eli Zaretskii \u003celiz@gnu.org\u003e\nApproved-By: Tom Tromey \u003ctom@tromey.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2b76e2fb2b9a31ce4a7137fdd6b3a4fd08f3e92d",
      "old_mode": 33188,
      "old_path": "gdb/NEWS",
      "new_id": "b9c9afc1d77a44f37937e421b04e26d30fb69e39",
      "new_mode": 33188,
      "new_path": "gdb/NEWS"
    },
    {
      "type": "modify",
      "old_id": "6472bd37071f3c01041332b1aa83070204cf372f",
      "old_mode": 33188,
      "old_path": "gdb/doc/python.texi",
      "new_id": "e3f95ee1d24e73b5fc0e53d8f6f7c3b247096b2b",
      "new_mode": 33188,
      "new_path": "gdb/doc/python.texi"
    },
    {
      "type": "modify",
      "old_id": "cedd897ab0f2727e0ec63f87e3c944660e18f428",
      "old_mode": 33188,
      "old_path": "gdb/python/lib/gdb/__init__.py",
      "new_id": "0388c6a2c00adccba8fb05b87e128b22c70e37fb",
      "new_mode": 33188,
      "new_path": "gdb/python/lib/gdb/__init__.py"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "73d94d1bb51f5f8d403cdd85f166ebb4c75fdcd0",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.python/py-style-parameter-set.exp"
    }
  ]
}
