)]}'
{
  "commit": "be7d5d2c417a842452f5f5d4ed7fc8d058a970bf",
  "tree": "3c52d06e20775a3b4447358f619f2df587f9f265",
  "parents": [
    "74c36641b0e997ce81294e5bd4fe2d2ce017ea57"
  ],
  "author": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Thu Sep 07 21:59:33 2023 +0200"
  },
  "committer": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Thu Sep 07 21:59:33 2023 +0200"
  },
  "message": "[gdb/symtab] Fix gdb-index writing for .debug_types\n\nWith test-case gdb.ada/same_enum.exp and target board dwarf4-gdb-index we run\ninto:\n...\n(gdb) print red^M\nNo definition of \"red\" in current context.^M\n(gdb) FAIL: gdb.ada/same_enum.exp: print red\n...\n\n[ This is a regression since commit 844a72efbce (\"Simplify gdb_index writing\"),\nso this is broken in gdb 12 and 13. ]\n\nThe easiest way to see what\u0027s going wrong is with readelf.  We have in section\n.gdb_index:\n...\n[7194] pck__red:\n        2 [static, variable]\n        3 [static, variable]\n...\nwhich points to the CUs 2 and 3 in the CU list (shown using \"2\" and \"3\"), but\nshould be pointing to the TUs 2 and 3 in the TU list (shown using \"T2\" and\n\"T3\").\n\nFix this by removing the counter / types_counter distinction in\nwrite_gdbindex, such that we get the expected:\n...\n[7194] pck__red:\n        T2 [static, variable]\n        T3 [static, variable]\n...\n\n[ While reading write_gdbindex I noticed a few oddities related to dwz\nhandling, I\u0027ve filed PR30829 about this. ]\n\nTested on x86_64-linux.\n\nApproved-By: Tom Tromey \u003ctom@tromey.com\u003e\n\nPR symtab/30827\nBug: https://sourceware.org/bugzilla/show_bug.cgi?id\u003d30827\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e178bb067a989c04ba390fe30d33830ef84b4a3f",
      "old_mode": 33188,
      "old_path": "gdb/dwarf2/index-write.c",
      "new_id": "11f254e263ac1a949019e9493a19fc7c0bc0823b",
      "new_mode": 33188,
      "new_path": "gdb/dwarf2/index-write.c"
    }
  ]
}
