)]}'
{
  "commit": "3296caafa31264bf2ea8f2ebd01efcd3caeb6a58",
  "tree": "9ad1f4b317eaeeeb2e01a15709fbf73ad4841b2d",
  "parents": [
    "d9d09c878e5648501e33a3f07950c633ca70b298"
  ],
  "author": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Fri Jul 17 16:30:15 2026 +0200"
  },
  "committer": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Fri Jul 17 16:30:15 2026 +0200"
  },
  "message": "[gdb] Fix hard-coded constants in buildsym_compunit::make_blockvector\n\nI came across some code in buildsym_compunit::make_blockvector that uses\nhardcoded constants 0 and 1:\n...\n      gdb_assert (blockvector-\u003eblock (0)-\u003eis_global_block ());\n      gdb_assert (blockvector-\u003eblock (1)-\u003eis_static_block ());\n...\n\nFix this by instead using the symbolic constants GLOBAL_BLOCK and\nSTATIC_BLOCK.\n\nThe same function has an odd-looking for loop that uses a hard-coded \u00271\u0027 to\nskip the global block:\n...\n       /* The \u0027J \u003e 1\u0027 here is so that we don\u0027t place the global block into\n \t the map.  For CU with gaps, the static block will reflect the\n \t gaps, while the global block will just reflect the full extent of\n \t the range.  */\n      for (int j \u003d num_blocks; j \u003e 1; )\n \t{\n\t  --j;\n \t  struct block *b \u003d blockvector-\u003eblock (j);\n...\n\nFix this by rewriting it into an ordinary descending for loop, and using\nsymbolic constant GLOBAL_BLOCK to avoid the global block:\n...\n      for (int j \u003d num_blocks - 1; j \u003e GLOBAL_BLOCK; --j)\n \t{\n \t  struct block *b \u003d blockvector-\u003eblock (j);\n...\n\nApproved-By: Tom Tromey \u003ctom@tromey.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b543cd10eb546c3f3a3412879072d452bc1ba454",
      "old_mode": 33188,
      "old_path": "gdb/buildsym.c",
      "new_id": "2b0a9a39b81a8ac6924175ce07cb2c794cfc3480",
      "new_mode": 33188,
      "new_path": "gdb/buildsym.c"
    }
  ]
}
