)]}'
{
  "commit": "00105aa1c4d9933fe3cfe9bc1be0daefe9f8ca36",
  "tree": "dd077abbf5a07581e38eb098133690987dc4ae4b",
  "parents": [
    "7d5702b8fdee17a5b4597b2b03c93e97d5b4c136"
  ],
  "author": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Tue Sep 24 10:24:22 2024 +0200"
  },
  "committer": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Tue Sep 24 10:24:22 2024 +0200"
  },
  "message": "[gdb/symtab] Don\u0027t expand non-Ada CUs for info exceptions\n\nI noticed when running test-case gdb.ada/info_exc.exp with glibc debug info\ninstalled, that the \"info exceptions\" command that lists all Ada exceptions\nalso expands non-Ada CUs, which includes CUs in\n/lib64/ld-linux-x86-64.so.2 and /lib64/libc.so.6.\n\nFix this by:\n- adding a new lang_matcher parameter to the expand_symtabs_matching\n  function, and\n- using that new parameter in the expand_symtabs_matching call in\n  ada_add_global_exceptions.\n\nThe new parameter is a hint, meaning implementations are free to ignore it and\nexpand CUs with any language.  This is the case for partial symtabs, I\u0027m not\nsure whether it makes sense to implement support for this there.\n\nConversely, when processing a CU with language C and name \"\u003cartificial\u003e\"\n(as produced by GCC LTO), the CU may not really have a single language and we\nshould ignore the lang_matcher.  See also commit d2f67711730\n(\"Fix \u0027catch exception\u0027 with -flto\").\n\nNow that we have lang_matcher available, also use it to limit name splitting\nstyles and symbol matchers to those applicable to the matched languages.\n\nWithout this patch we have (with a gdb build with -O0):\n...\n$ time gdb -q -batch -x outputs/gdb.ada/info_exc/gdb.in.1 \u003e /dev/null\nreal\t0m1.866s\nuser\t0m2.089s\nsys\t0m0.120s\n...\nand with this patch we have:\n...\n$ time gdb -q -batch -x outputs/gdb.ada/info_exc/gdb.in.1 \u003e /dev/null\nreal\t0m0.469s\nuser\t0m0.777s\nsys\t0m0.051s\n...\n\nOr, to put it in terms of number of CUs, we have 1853 CUs:\n...\n$ gdb -q -batch -readnow outputs/gdb.ada/info_exc/foo \\\n    -ex start \\\n    -ex \"maint info symtabs\" \\\n    | grep -c \" name \"\n1853\n...\n\nWithout this patch, we have:\n...\n$ gdb -q -batch outputs/gdb.ada/info_exc/foo \\\n    -ex start \\\n    -ex \"info exceptions\" \\\n    -ex \"maint info symtabs\" \\\n    | grep -c \" name \"\n1393\n...\nso ~75% of the CUs is expanded, and with this patch we have:\n...\n$ gdb \u003csame-as-above\u003e\n20\n...\nso ~1% of the CUs is expanded.\n\nTested on x86_64-linux.\n\nApproved-By: Tom Tromey \u003ctom@tromey.com\u003e\n\nPR symtab/32182\nBug: https://sourceware.org/bugzilla/show_bug.cgi?id\u003d32182\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0f7100dfc949df9e90913858ffa8d084b3eed1bc",
      "old_mode": 33188,
      "old_path": "gdb/ada-lang.c",
      "new_id": "9b61f19b072f061de526dc4834453c8323d34915",
      "new_mode": 33188,
      "new_path": "gdb/ada-lang.c"
    },
    {
      "type": "modify",
      "old_id": "802e8567d0988613ecf515e515806a276dbc8b78",
      "old_mode": 33188,
      "old_path": "gdb/dwarf2/cooked-index.h",
      "new_id": "0873e7dce1d1e02b7eb4f8ae5bbda2a389f37410",
      "new_mode": 33188,
      "new_path": "gdb/dwarf2/cooked-index.h"
    },
    {
      "type": "modify",
      "old_id": "8cd665cee3726319c82cd7656a53cfdc98630809",
      "old_mode": 33188,
      "old_path": "gdb/dwarf2/read-gdb-index.c",
      "new_id": "701cdecf392c352c781e6537e8531a77993fc6f4",
      "new_mode": 33188,
      "new_path": "gdb/dwarf2/read-gdb-index.c"
    },
    {
      "type": "modify",
      "old_id": "bbd6bfbaf45d35d4a718e324e8fe937ce8d9fd0f",
      "old_mode": 33188,
      "old_path": "gdb/dwarf2/read.c",
      "new_id": "ca27391a6f5eba206aa71dca0b33556770c2a8b3",
      "new_mode": 33188,
      "new_path": "gdb/dwarf2/read.c"
    },
    {
      "type": "modify",
      "old_id": "b23972b7a4e8cc1dc6be828da7658947a26a5190",
      "old_mode": 33188,
      "old_path": "gdb/dwarf2/read.h",
      "new_id": "7c42017c3d62f227604f0afe18e69af46a157307",
      "new_mode": 33188,
      "new_path": "gdb/dwarf2/read.h"
    },
    {
      "type": "modify",
      "old_id": "8b1e89cfe64e8e7a62860f622953164f93e6d0b5",
      "old_mode": 33188,
      "old_path": "gdb/objfiles.h",
      "new_id": "d92570a00bdb168e5db1dda1a976e44c2c434f51",
      "new_mode": 33188,
      "new_path": "gdb/objfiles.h"
    },
    {
      "type": "modify",
      "old_id": "e25c3ab33ec7c6c3d118ae0c643528a1895fc7b6",
      "old_mode": 33188,
      "old_path": "gdb/psymtab.c",
      "new_id": "f8c83d9b17f082f4a22ac3467765b149a8b3e864",
      "new_mode": 33188,
      "new_path": "gdb/psymtab.c"
    },
    {
      "type": "modify",
      "old_id": "a81526cddeebe783595e3ecbb1c3cee21931aa37",
      "old_mode": 33188,
      "old_path": "gdb/psymtab.h",
      "new_id": "b23aadbf26a53cf36b02a6a20e41d7fb6dc18b00",
      "new_mode": 33188,
      "new_path": "gdb/psymtab.h"
    },
    {
      "type": "modify",
      "old_id": "d6de7340065c2f732da33b184014f25ab7e10579",
      "old_mode": 33188,
      "old_path": "gdb/quick-symbol.h",
      "new_id": "0d76e1860ed2e8b2a98cbf62e9a9fe42385c090f",
      "new_mode": 33188,
      "new_path": "gdb/quick-symbol.h"
    },
    {
      "type": "modify",
      "old_id": "0eccda21f39f1ea35488cfed38d6b67ff2f74f62",
      "old_mode": 33188,
      "old_path": "gdb/symfile-debug.c",
      "new_id": "6bf8dc3cd821d4ef9ffd5509f669c2b64d9aaaa7",
      "new_mode": 33188,
      "new_path": "gdb/symfile-debug.c"
    },
    {
      "type": "modify",
      "old_id": "2292ecaf3442207dd6658c6fd6f3e7ca757ad94d",
      "old_mode": 33188,
      "old_path": "gdb/symfile.c",
      "new_id": "1502fdbe500be34e5178ee0cfd54a0e1e410a991",
      "new_mode": 33188,
      "new_path": "gdb/symfile.c"
    },
    {
      "type": "modify",
      "old_id": "508ba48d1613649322915606828b050339e988c3",
      "old_mode": 33188,
      "old_path": "gdb/symfile.h",
      "new_id": "74187c82f97993ce8877cbc7d39be980ca1556bf",
      "new_mode": 33188,
      "new_path": "gdb/symfile.h"
    }
  ]
}
