)]}'
{
  "commit": "2b9f9de4e4cbd2ee62b0993c5fd74fc24150a26c",
  "tree": "93c5da2be17fb82eae691f7ce829918fcb7ab6cd",
  "parents": [
    "e352e8b044ebfe2a0ed31be43f6d57cf1a041a7e"
  ],
  "author": {
    "name": "Simon Marchi",
    "email": "simon.marchi@efficios.com",
    "time": "Tue Apr 29 15:31:45 2025 -0400"
  },
  "committer": {
    "name": "Simon Marchi",
    "email": "simon.marchi@efficios.com",
    "time": "Tue Apr 29 15:44:08 2025 -0400"
  },
  "message": "gdb/dwarf: scan .debug_info.dwo just once\n\nWhen building -gsplit-dwarf and -fdebug-types-section in DWARF 5, the\nresulting .dwo files will typically have a .debug_info.dwo section with\nmultiple type units followed by one compile unit:\n\n    $ llvm-dwarfdump -F -color a-test.dwo | grep \u0027 Unit\u0027\n    0x00000000: Type Unit: length \u003d 0x000008a0, format \u003d DWARF32, version \u003d 0x0005, unit_type \u003d DW_UT_split_type, abbr_offset \u003d 0x0000, addr_size \u003d 0x08, name \u003d \u0027vector\u003cint, std::allocator\u003cint\u003e \u003e\u0027, type_signature \u003d 0xb499dcf29e2928c4, type_offset \u003d 0x0023 (next unit at 0x000008a4)\n    0x000008a4: Type Unit: length \u003d 0x00000099, format \u003d DWARF32, version \u003d 0x0005, unit_type \u003d DW_UT_split_type, abbr_offset \u003d 0x0000, addr_size \u003d 0x08, name \u003d \u0027allocator\u003cint\u003e\u0027, type_signature \u003d 0x496a8791a842701b, type_offset \u003d 0x0023 (next unit at 0x00000941)\n    ...\n    0x000015c1: Compile Unit: length \u003d 0x00000f58, format \u003d DWARF32, version \u003d 0x0005, unit_type \u003d DW_UT_split_compile, abbr_offset \u003d 0x0000, addr_size \u003d 0x08, DWO_id \u003d 0xe8e359820d1c5803 (next unit at 0x0000251d)\n\nIn open_and_init_dwo_file, we call create_dwo_cus_hash_table, which\nscans the section, looking for compile units, then call\ncreate_dwo_debug_types_hash_table, which scans the section again,\nlooking for type units.  It would make more sense to scan the section\njust once and handle both compile and type units at the same time.\n\nTo achieve this, add create_dwo_unit_hash_tables, which knows how to\nhandle both unit kinds in a single scan.  It replaces\ncreate_dwo_cus_hash_table and create_dwo_debug_type_hash_table.  Change\nopen_and_init_dwo_file to call it.\n\nNote that I removed the DWARF version check in open_and_init_dwo_file\nwhen processing .debug_type.dwo sections: in DWARF 5, the\n.debug_type.dwo sections will just not exist, so the\n`dwo_file-\u003esections.types` vector will be empty.\n\nChange-Id: I6e51d0ca06c258e0bf0e59927d62ae2df314a162\nApproved-By: Tom Tromey \u003ctom@tromey.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9a5e3b10a2c2545a395f7e6c454724d39beabb80",
      "old_mode": 33188,
      "old_path": "gdb/dwarf2/read.c",
      "new_id": "cedd068158287ff89b2f9d09e7087ce426bf2ac0",
      "new_mode": 33188,
      "new_path": "gdb/dwarf2/read.c"
    },
    {
      "type": "modify",
      "old_id": "202e3524fb3e2c1007219990bcd3c537835c429a",
      "old_mode": 33188,
      "old_path": "gdb/dwarf2/read.h",
      "new_id": "c69d8fbe5f1a8fcb2da03e6f61bcca7d65c142b7",
      "new_mode": 33188,
      "new_path": "gdb/dwarf2/read.h"
    }
  ]
}
