)]}'
{
  "commit": "d878bb39e417fa23b8dc62fed916708e776a9b71",
  "tree": "ca07f1e7869b7e8d4b785c8052fd310aaf251569",
  "parents": [
    "a4fac33dc3ab42bd6a5f41c0ceca66e681a7de8b"
  ],
  "author": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Tue Sep 06 10:15:01 2022 +0200"
  },
  "committer": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Tue Sep 06 10:15:01 2022 +0200"
  },
  "message": "[gdb/symtab] Support .debug_names section with TUs in .debug_info\n\nWhen running test-case gdb.cp/cpexprs-debug-types.exp on target board\ncc-with-debug-names/gdb:debug_flags\u003d-gdwarf-5, we get an executable with\na .debug_names section, but no .debug_types section.  For dwarf-5, the TUs\nare no longer put in a separate unit, but instead they\u0027re put in the\n.debug_info section.\n\nWhen loading the executable, the .debug_names section is silently ignored\nbecause of this check in dwarf2_read_debug_names:\n...\n  if (map-\u003etu_count !\u003d 0)\n    {\n      /* We can only handle a single .debug_types when we have an\n         index.  */\n      if (per_bfd-\u003etypes.size () !\u003d 1)\n        return false;\n...\nwhich triggers because per_bfd-\u003etypes.size () \u003d\u003d 0.\n\nThe intention of the check is to make sure we don\u0027t have more that one\n.debug_types section, as can happen in a object file (see PR12984):\n...\n$ grep \"\\.debug_types\" 11.s\n        .section        .debug_types,\"G\",@progbits,wt.75c042c23a9a07ee,comdat\n        .section        .debug_types,\"G\",@progbits,wt.c59c413bf50a4607,comdat\n...\n\nFix this by:\n- changing the check condition to \"per_bfd-\u003etypes.size () \u003e 1\", and\n- handling per_bfd-\u003etypes.size () \u003d\u003d 0.\n\nTested on x86_64-linux.\n\nBug: https://sourceware.org/bugzilla/show_bug.cgi?id\u003d29385\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "08dd0b76b23f2bc8cea4b53f945e36097d751965",
      "old_mode": 33188,
      "old_path": "gdb/dwarf2/read.c",
      "new_id": "3ca441c4cae6fa1e2e0e98ce83e9e3d38bc8e973",
      "new_mode": 33188,
      "new_path": "gdb/dwarf2/read.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "ac3b459db086852ff4f8aea2b2b863e7bea5cc43",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.dwarf2/debug-names-tu-dwarf5.exp"
    },
    {
      "type": "modify",
      "old_id": "34fecff7b9dd051844e17fdb5f41c91bbc253bc6",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.dwarf2/debug-names-tu.exp",
      "new_id": "b796a7320beb9f0d019e0e5d5bb59a2707276c4d",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.dwarf2/debug-names-tu.exp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "738ecc47c5a417d45bad2f2305d7587b2d57ce29",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.dwarf2/debug-names-tu.exp.tcl"
    },
    {
      "type": "modify",
      "old_id": "b0e248c8e2f87171904c889b4b447e9df7c3c383",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/lib/dwarf.exp",
      "new_id": "6db0ed28deb7064ab29315ffdb3eca507543457b",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/lib/dwarf.exp"
    }
  ]
}
