)]}'
{
  "commit": "dd787f5e654f0390cf388e412b5921163b94f1a7",
  "tree": "a177736d42305fbb89f1d833c8393daf6bdeea9d",
  "parents": [
    "fb113f4f48482171dffd287b2bdb71a6c7e20797"
  ],
  "author": {
    "name": "Tom Tromey",
    "email": "tom@tromey.com",
    "time": "Sat Feb 15 09:54:44 2020 -0700"
  },
  "committer": {
    "name": "Simon Marchi",
    "email": "simon.marchi@efficios.com",
    "time": "Tue May 12 15:24:51 2020 -0400"
  },
  "message": "Share DWARF partial symtabs\n\nThis changes the DWARF reader to share partial symtabs (or indices if\nthey are available) across objfiles.  This has a few parts.\n\n* If multiple objfiles backed by the same BFD can share partial symtabs\n  (see below), a single dwarf2_per_bfd is created.  It is stored in the\n  per-bfd `dwarf2_per_bfd_bfd_data_key` registry.  Multiple\n  dwarf2_per_objfile objects will point to the same instance.  The\n  lifetime of these dwarf2_per_bfd objects is naturally handled.  When\n  all the objfiles using the BFD are destroyed, the BFD\u0027s refount drops\n  to 0, which triggers the removal of the corresponding dwarf2_per_bfd\n  object from the registry and its destruction.\n\n* If multiple objfiles backed by the same BFD can\u0027t share partial\n  symtabs (see below), one dwarf2_per_bfd object is created for each\n  objfile.  Each dwarf2_per_objfile will point to their own instance of\n  dwarf2_per_bfd.  These instances of dwarf2_per_bfd are kept in a\n  per-objfile registry, meaning that when the objfile gets destroyed,\n  the dwarf2_per_bfd instance gets destroyed as well.\n\n* objfile::partial_symtabs is changed to be a shared_ptr again.  This\n  lets us stash a second reference in dwarf2_per_bfd; if the DWARF\n  data is being shared, we can simply copy this value to the new\n  objfile.\n\n* Two dwarf2_per_objfile objects backed by the same BFD may share a\n  dwarf2_per_bfd instance if:\n\n  * No other symbol reader has found symbols, and\n  * No BFD section rqeuires relocation\n\nYYYY-MM-DD  Tom Tromey  \u003ctom@tromey.com\u003e\nYYYY-MM-DD  Simon Marchi  \u003csimon.marchi@efficios.com\u003e\n\n\t* objfiles.h (struct objfile) \u003cpartial_symtabs\u003e: Now a\n\tshared_ptr.\n\t* dwarf2/read.h (struct dwarf2_per_objfile) \u003cpartial_symtabs\u003e: New\n\tmember.\n\t* dwarf2/read.c (dwarf2_per_bfd_bfd_data_key,\n\tdwarf2_per_bfd_objfile_data_key\u003e: New globals.\n\t(dwarf2_has_info): Use shared dwarf2_per_bfd if possible.\n\t(dwarf2_get_section_info): Use get_dwarf2_per_objfile.\n\t(dwarf2_initialize_objfile): Consider cases where per_bfd can be\n\tshared.\n\t(dwarf2_build_psymtabs): Set objfile::partial_symtabs and\n\tshort-circuit when sharing.\n\t(dwarf2_build_psymtabs): Set dwarf2_per_objfile::partial_symtabs.\n\t(dwarf2_psymtab::expand_psymtab): Use free_cached_comp_units.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3f93a51381f27cc43ec694b205a3e25e13143bf9",
      "old_mode": 33188,
      "old_path": "gdb/dwarf2/read.c",
      "new_id": "2de4ead004f1304bfab6020772c390d1cad0d0a9",
      "new_mode": 33188,
      "new_path": "gdb/dwarf2/read.c"
    },
    {
      "type": "modify",
      "old_id": "996cf55af22b2f56f6000f833544bb337beefd5e",
      "old_mode": 33188,
      "old_path": "gdb/dwarf2/read.h",
      "new_id": "53f0c7361a3364b3bab9314326abbd13fe0732f0",
      "new_mode": 33188,
      "new_path": "gdb/dwarf2/read.h"
    },
    {
      "type": "modify",
      "old_id": "0b47bd0c1e2f9356320ecd02b69e2cf79e18fc81",
      "old_mode": 33188,
      "old_path": "gdb/objfiles.h",
      "new_id": "56ff52119dc4de117d7b123307e3f19eab2d356a",
      "new_mode": 33188,
      "new_path": "gdb/objfiles.h"
    }
  ]
}
