@@ -198,9 +198,10 @@ class offset_view
198198 gdb::array_view<const gdb_byte> m_bytes;
199199};
200200
201- /* A description of the mapped index. The file format is described in
201+ /* A description of .gdb_index index. The file format is described in
202202 a comment by the code that writes the index. */
203- struct mapped_index final : public mapped_index_base
203+
204+ struct mapped_gdb_index final : public mapped_index_base
204205{
205206 /* Index data format version. */
206207 int version = 0;
@@ -1925,7 +1926,7 @@ struct dwarf2_debug_names_index : public dwarf2_base_index_functions
19251926};
19261927
19271928quick_symbol_functions_up
1928- mapped_index ::make_quick_functions () const
1929+ mapped_gdb_index ::make_quick_functions () const
19291930{
19301931 return quick_symbol_functions_up (new dwarf2_gdb_index);
19311932}
@@ -2123,10 +2124,10 @@ create_cu_from_index_list (dwarf2_per_bfd *per_bfd,
21232124 CUs. */
21242125
21252126static void
2126- create_cus_from_index_list (dwarf2_per_bfd *per_bfd,
2127- const gdb_byte *cu_list, offset_type n_elements,
2128- struct dwarf2_section_info *section,
2129- int is_dwz)
2127+ create_cus_from_gdb_index_list (dwarf2_per_bfd *per_bfd,
2128+ const gdb_byte *cu_list, offset_type n_elements,
2129+ struct dwarf2_section_info *section,
2130+ int is_dwz)
21302131{
21312132 for (offset_type i = 0; i < n_elements; i += 2)
21322133 {
@@ -2148,28 +2149,28 @@ create_cus_from_index_list (dwarf2_per_bfd *per_bfd,
21482149 the CU objects for PER_BFD. */
21492150
21502151static void
2151- create_cus_from_index (dwarf2_per_bfd *per_bfd,
2152+ create_cus_from_gdb_index (dwarf2_per_bfd *per_bfd,
21522153 const gdb_byte *cu_list, offset_type cu_list_elements,
21532154 const gdb_byte *dwz_list, offset_type dwz_elements)
21542155{
21552156 gdb_assert (per_bfd->all_units.empty ());
21562157 per_bfd->all_units.reserve ((cu_list_elements + dwz_elements) / 2);
21572158
2158- create_cus_from_index_list (per_bfd, cu_list, cu_list_elements,
2159- &per_bfd->info, 0);
2159+ create_cus_from_gdb_index_list (per_bfd, cu_list, cu_list_elements,
2160+ &per_bfd->info, 0);
21602161
21612162 if (dwz_elements == 0)
21622163 return;
21632164
21642165 dwz_file *dwz = dwarf2_get_dwz_file (per_bfd);
2165- create_cus_from_index_list (per_bfd, dwz_list, dwz_elements,
2166- &dwz->info, 1);
2166+ create_cus_from_gdb_index_list (per_bfd, dwz_list, dwz_elements,
2167+ &dwz->info, 1);
21672168}
21682169
21692170/* Create the signatured type hash table from the index. */
21702171
21712172static void
2172- create_signatured_type_table_from_index
2173+ create_signatured_type_table_from_gdb_index
21732174 (dwarf2_per_bfd *per_bfd, struct dwarf2_section_info *section,
21742175 const gdb_byte *bytes, offset_type elements)
21752176{
@@ -2253,12 +2254,12 @@ create_signatured_type_table_from_debug_names
22532254 per_objfile->per_bfd->signatured_types = std::move (sig_types_hash);
22542255}
22552256
2256- /* Read the address map data from the mapped index, and use it to
2257+ /* Read the address map data from the mapped GDB index, and use it to
22572258 populate the index_addrmap. */
22582259
22592260static void
2260- create_addrmap_from_index (dwarf2_per_objfile *per_objfile,
2261- struct mapped_index *index)
2261+ create_addrmap_from_gdb_index (dwarf2_per_objfile *per_objfile,
2262+ mapped_gdb_index *index)
22622263{
22632264 struct objfile *objfile = per_objfile->objfile;
22642265 dwarf2_per_bfd *per_bfd = per_objfile->per_bfd;
@@ -2521,7 +2522,7 @@ static bool
25212522read_gdb_index_from_buffer (const char *filename,
25222523 bool deprecated_ok,
25232524 gdb::array_view<const gdb_byte> buffer,
2524- struct mapped_index *map,
2525+ mapped_gdb_index *map,
25252526 const gdb_byte **cu_list,
25262527 offset_type *cu_list_elements,
25272528 const gdb_byte **types_list,
@@ -2652,7 +2653,7 @@ dwarf2_read_gdb_index
26522653 if (main_index_contents.empty ())
26532654 return 0;
26542655
2655- std::unique_ptr<struct mapped_index > map (new struct mapped_index );
2656+ std::unique_ptr<mapped_gdb_index > map (new mapped_gdb_index );
26562657 if (!read_gdb_index_from_buffer (objfile_name (objfile),
26572658 use_deprecated_index_sections,
26582659 main_index_contents, map.get (), &cu_list,
@@ -2669,7 +2670,7 @@ dwarf2_read_gdb_index
26692670 dwz = dwarf2_get_dwz_file (per_bfd);
26702671 if (dwz != NULL)
26712672 {
2672- struct mapped_index dwz_map;
2673+ mapped_gdb_index dwz_map;
26732674 const gdb_byte *dwz_types_ignore;
26742675 offset_type dwz_types_elements_ignore;
26752676
@@ -2691,8 +2692,8 @@ dwarf2_read_gdb_index
26912692 }
26922693 }
26932694
2694- create_cus_from_index (per_bfd, cu_list, cu_list_elements, dwz_list,
2695- dwz_list_elements);
2695+ create_cus_from_gdb_index (per_bfd, cu_list, cu_list_elements, dwz_list,
2696+ dwz_list_elements);
26962697
26972698 if (types_list_elements)
26982699 {
@@ -2709,13 +2710,13 @@ dwarf2_read_gdb_index
27092710 ? &per_bfd->types[0]
27102711 : &per_bfd->info);
27112712
2712- create_signatured_type_table_from_index (per_bfd, section, types_list,
2713- types_list_elements);
2713+ create_signatured_type_table_from_gdb_index (per_bfd, section, types_list,
2714+ types_list_elements);
27142715 }
27152716
27162717 finalize_all_units (per_bfd);
27172718
2718- create_addrmap_from_index (per_objfile, map.get ());
2719+ create_addrmap_from_gdb_index (per_objfile, map.get ());
27192720
27202721 per_bfd->index_table = std::move (map);
27212722 per_bfd->quick_file_names_table =
@@ -2947,7 +2948,7 @@ dw2_symtab_iter_init (struct dw2_symtab_iterator *iter,
29472948 dwarf2_per_objfile *per_objfile,
29482949 gdb::optional<block_enum> block_index,
29492950 domain_enum domain, offset_type namei,
2950- mapped_index &index)
2951+ mapped_gdb_index &index)
29512952{
29522953 iter->per_objfile = per_objfile;
29532954 iter->block_index = block_index;
@@ -2968,7 +2969,7 @@ dw2_symtab_iter_init (struct dw2_symtab_iterator *iter,
29682969
29692970static struct dwarf2_per_cu_data *
29702971dw2_symtab_iter_next (struct dw2_symtab_iterator *iter,
2971- mapped_index &index)
2972+ mapped_gdb_index &index)
29722973{
29732974 dwarf2_per_objfile *per_objfile = iter->per_objfile;
29742975
@@ -3091,8 +3092,8 @@ dwarf2_gdb_index::dump (struct objfile *objfile)
30913092{
30923093 dwarf2_per_objfile *per_objfile = get_dwarf2_per_objfile (objfile);
30933094
3094- mapped_index *index = (gdb::checked_static_cast<mapped_index *>
3095- (per_objfile->per_bfd->index_table.get ()));
3095+ mapped_gdb_index *index = (gdb::checked_static_cast<mapped_gdb_index *>
3096+ (per_objfile->per_bfd->index_table.get ()));
30963097 gdb_printf (".gdb_index: version %d\n", index->version);
30973098 gdb_printf ("\n");
30983099}
@@ -3143,8 +3144,8 @@ dwarf2_gdb_index::expand_matching_symbols
31433144
31443145 const block_enum block_kind = global ? GLOBAL_BLOCK : STATIC_BLOCK;
31453146
3146- mapped_index &index
3147- = *(gdb::checked_static_cast<mapped_index *>
3147+ mapped_gdb_index &index
3148+ = *(gdb::checked_static_cast<mapped_gdb_index *>
31483149 (per_objfile->per_bfd->index_table.get ()));
31493150
31503151 const char *match_name = name.ada ().lookup_name ().c_str ();
@@ -3993,8 +3994,8 @@ dw2_expand_marked_cus
39933994{
39943995 offset_type vec_len, vec_idx;
39953996 bool global_seen = false;
3996- mapped_index &index
3997- = *(gdb::checked_static_cast<mapped_index *>
3997+ mapped_gdb_index &index
3998+ = *(gdb::checked_static_cast<mapped_gdb_index *>
39983999 (per_objfile->per_bfd->index_table.get ()));
39994000
40004001 offset_view vec (index.constant_pool.slice (index.symbol_vec_index (idx)));
@@ -4213,8 +4214,8 @@ dwarf2_gdb_index::expand_symtabs_matching
42134214 return true;
42144215 }
42154216
4216- mapped_index &index
4217- = *(gdb::checked_static_cast<mapped_index *>
4217+ mapped_gdb_index &index
4218+ = *(gdb::checked_static_cast<mapped_gdb_index *>
42184219 (per_objfile->per_bfd->index_table.get ()));
42194220
42204221 bool result
0 commit comments