)]}'
{
  "commit": "093c33e7a707b7f6654b7331dff31b743a49eb8a",
  "tree": "3a34be5e0cdbe955f1c68d572d672951887f37ad",
  "parents": [
    "9f034d7573ec4fb4bd3879ce66fef0a20167a2ba"
  ],
  "author": {
    "name": "Simon Marchi",
    "email": "simon.marchi@ericsson.com",
    "time": "Mon Mar 26 15:20:34 2018 -0400"
  },
  "committer": {
    "name": "Simon Marchi",
    "email": "simon.marchi@ericsson.com",
    "time": "Mon Mar 26 17:07:45 2018 -0400"
  },
  "message": "Move DWARF index-related things to a separate file\n\nI want to add a DWARF index-related feature (automatically produce index\nfiles when loading objfiles in GDB), but I don\u0027t want to add many\nhundred lines to the already too big dwarf2read.c.  I thought it would\nbe a logical split to move everything related to the DWARF index to its\nown file.\n\nI first tried to move everything that reads and writes DWARF indices to\na separate file, but found that the \"read\" part is a little bit\nentangled with the rest of dwarf2read.c, so the line is hard to draw\nabout where to split.  The write part is quite isolated though, so I\nmoved this part to a new file, dwarf-index-write.c.  Some things are\nnecessary to both reading and writing indices, so I placed them in\ndwarf-index-common.{c,h}.  The idea would be to have a\ndwarf-index-read.c eventually that would use it too (for now that code\nis still in dwarf2read.c).\n\nThis required moving some things to a new dwarf2read.h header, so they\ncan be read by the code that writes the index.\n\nThe patch is big in number of lines, but it\u0027s all existing code being\nmoved around.  The only changes are that some functions are not static\nanymore, a declaration is added in a .h file, and therefore the comment\nis moved there.\n\nI built-tested it with a little and big endian target.\n\nThis patch is also available on the users/simark/split-dwarf2read\nbranch.\n\ngdb/ChangeLog:\n\n\t* Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and\n\tdwarf-index-write.c\n\t(HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.\n\t* dwarf-index-common.c: New file.\n\t* dwarf-index-common.h: New file.\n\t* dwarf-index-write.c: New file.\n\t* dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.\n\t(struct dwarf2_section_info): Move from here.\n\t(dwarf2_section_info_def): Likewise.\n\t(DEF_VEC_O (dwarf2_section_info_def)): Likewise.\n\t(offset_type): Likewise.\n\t(DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.\n\t(DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.\n\t(DW2_GDB_INDEX_CU_SET_VALUE): Likewise.\n\t(byte_swap): Likewise.\n\t(MAYBE_SWAP): Likewise.\n\t(dwarf2_per_cu_ptr): Likewise.\n\t(DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.\n\t(struct tu_stats): Likewise.\n\t(struct dwarf2_per_objfile): Likewise.\n\t(struct dwarf2_per_cu_data): Likewise.\n\t(struct signatured_type): Likewise.\n\t(sig_type_ptr): Likewise.\n\t(DEF_VEC_P (sig_type_ptr)): Likewise.\n\t(INDEX4_SUFFIX): Likewise.\n\t(INDEX5_SUFFIX): Likewise.\n\t(DEBUG_STR_SUFFIX): Likewise.\n\t(dwarf2_read_section): Make non-static.\n\t(mapped_index_string_hash): Move from here.\n\t(dwarf5_djb_hash): Likewise.\n\t(file_write): Likewise.\n\t(class data_buf): Likewise.\n\t(struct symtab_index_entry): Likewise.\n\t(struct mapped_symtab): Likewise.\n\t(find_slot): Likewise.\n\t(hash_expand): Likewise.\n\t(add_index_entry): Likewise.\n\t(uniquify_cu_indices): Likewise.\n\t(class c_str_view): Likewise.\n\t(class c_str_view_hasher): Likewise.\n\t(class vector_hasher): Likewise.\n\t(write_hash_table): Likewise.\n\t(psym_index_map): Likewise.\n\t(struct addrmap_index_data): Likewise.\n\t(add_address_entry): Likewise.\n\t(add_address_entry_worker): Likewise.\n\t(write_address_map): Likewise.\n\t(symbol_kind): Likewise.\n\t(write_psymbols): Likewise.\n\t(struct signatured_type_index_data): Likewise.\n\t(write_one_signatured_type): Likewise.\n\t(recursively_count_psymbols): Likewise.\n\t(recursively_write_psymbols): Likewise.\n\t(class debug_names): Likewise.\n\t(check_dwarf64_offsets): Likewise.\n\t(psyms_seen_size): Likewise.\n\t(write_gdbindex): Likewise.\n\t(write_debug_names): Likewise.\n\t(assert_file_size): Likewise.\n\t(write_psymtabs_to_index): Likewise.\n\t(save_gdb_index_command): Likewise.\n\t(_initialize_dwarf2_read): Don\u0027t register the \"save gdb-index\"\n\tcommand.\n\t* dwarf2read.h: New file.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b1ba00583f9bbbf259094c4e514d70874f0342ea",
      "old_mode": 33188,
      "old_path": "gdb/Makefile.in",
      "new_id": "0a07cabb438d73db4dfb3bb3a924728e7921e151",
      "new_mode": 33188,
      "new_path": "gdb/Makefile.in"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "991f640cd4596ddc9b14ff29404f6d0e8b75b84a",
      "new_mode": 33188,
      "new_path": "gdb/dwarf-index-common.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "32774c7bf62ac3f8d93c2e8a8f5a5caceac7b1e5",
      "new_mode": 33188,
      "new_path": "gdb/dwarf-index-common.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3059e0b776a311223b777a9331be91c7f1ba4c2a",
      "new_mode": 33188,
      "new_path": "gdb/dwarf-index-write.c"
    },
    {
      "type": "modify",
      "old_id": "211364c428a48657f001dbb859c1fa9a33e4b500",
      "old_mode": 33188,
      "old_path": "gdb/dwarf2read.c",
      "new_id": "ad90e1daae221ff143180eed4fa45c72d4a0459c",
      "new_mode": 33188,
      "new_path": "gdb/dwarf2read.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "46a10520ec2a18508adfa7f6616788c6b27e16a6",
      "new_mode": 33188,
      "new_path": "gdb/dwarf2read.h"
    }
  ]
}
