)]}'
{
  "commit": "5ad960fcdb6732c805d2a235efc8a40df644e03e",
  "tree": "068e495ad0cd75a2fd9740e5460d0d283ce10d93",
  "parents": [
    "42d385542f5f948e68db256b249662683057b288"
  ],
  "author": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Tue Oct 08 12:27:20 2024 +0200"
  },
  "committer": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Tue Oct 08 12:27:20 2024 +0200"
  },
  "message": "[gdb/symtab] Fix gdb.dwarf2/enum-type-c++.exp with cc-with-debug-types\n\nWhen running test-case gdb.dwarf2/enum-type-c++.exp with target board\ncc-with-debug-types, we run into:\n...\n(gdb) FAIL: gdb.dwarf2/enum-type-c++.exp: val1 has a parent\n...\nbecause val1 has no parent:\n...\n    [31] ((cooked_index_entry *) 0x7efedc002e90)\n    name:       val1\n    canonical:  val1\n    qualified:  val1\n    DWARF tag:  DW_TAG_enumerator\n    flags:      0x0 []\n    DIE offset: 0xef\n    parent:     ((cooked_index_entry *) 0)\n\n  ...\n\n    [37] ((cooked_index_entry *) 0x38ffd280)\n    name:       val1\n    canonical:  val1\n    qualified:  val1\n    DWARF tag:  DW_TAG_enumerator\n    flags:      0x0 []\n    DIE offset: 0xef\n    parent:     ((cooked_index_entry *) 0)\n...\n\nThere are two entries, which seems to be an inefficiency, but for now let\u0027s\nfocus on the correctness issue.\n\nThe debug info for val1 looks like this:\n...\n \u003c1\u003e\u003ccb\u003e: Abbrev Number: 2 (DW_TAG_namespace)\n    \u003ccc\u003e   DW_AT_name        : ns\n    \u003ccf\u003e   DW_AT_declaration : 1\n \u003c2\u003e\u003cd3\u003e: Abbrev Number: 12 (DW_TAG_class_type)\n    \u003cd4\u003e   DW_AT_name        : A\n    \u003cd6\u003e   DW_AT_declaration : 1\n \u003c3\u003e\u003cd6\u003e: Abbrev Number: 13 (DW_TAG_enumeration_type)\n    \u003cdb\u003e   DW_AT_declaration : 1\n \u003c1\u003e\u003cdd\u003e: Abbrev Number: 14 (DW_TAG_enumeration_type)\n    \u003ce7\u003e   DW_AT_specification: \u003c0xd6\u003e\n \u003c2\u003e\u003cef\u003e: Abbrev Number: 5 (DW_TAG_enumerator)\n    \u003cf0\u003e   DW_AT_name        : val1\n    \u003cf4\u003e   DW_AT_const_value : 1\n...\n\nFix this by:\n- adding a cooked index entry for DIE 0xcb (and consequently for child DIE\n  0xd3), by marking it interesting,\n- making sure that the entry for DIE 0xcb has a name, and\n- using the entry for DIE 0xd3 as parent entry for DIE 0xdd.\n\nTested on aarch64-linux.\n\nApproved-By: Tom Tromey \u003ctom@tromey.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bae8d8b3bed5dcff5af893cbc24a0a0d987ccac1",
      "old_mode": 33188,
      "old_path": "gdb/dwarf2/abbrev.c",
      "new_id": "c30db1ee31ae36c09033604aec58bd4cb932f64c",
      "new_mode": 33188,
      "new_path": "gdb/dwarf2/abbrev.c"
    },
    {
      "type": "modify",
      "old_id": "95e7d6aee31a6bc288d738db335d0ae01cea2e65",
      "old_mode": 33188,
      "old_path": "gdb/dwarf2/read.c",
      "new_id": "ea31d8dd851b4ac717c3ef94041177859765ce97",
      "new_mode": 33188,
      "new_path": "gdb/dwarf2/read.c"
    }
  ]
}
