Returns 1 if all went well, 0 otherwise.  */
 
 static bool
-read_index_from_section (struct objfile *objfile,
-                        const char *filename,
-                        bool deprecated_ok,
-                        struct dwarf2_section_info *section,
-                        struct mapped_index *map,
-                        const gdb_byte **cu_list,
-                        offset_type *cu_list_elements,
-                        const gdb_byte **types_list,
-                        offset_type *types_list_elements)
+read_gdb_index_from_section (struct objfile *objfile,
+                            const char *filename,
+                            bool deprecated_ok,
+                            struct dwarf2_section_info *section,
+                            struct mapped_index *map,
+                            const gdb_byte **cu_list,
+                            offset_type *cu_list_elements,
+                            const gdb_byte **types_list,
+                            offset_type *types_list_elements)
 {
   const gdb_byte *addr;
   offset_type version;
    elements of all the CUs and return 1.  Otherwise, return 0.  */
 
 static int
-dwarf2_read_index (struct dwarf2_per_objfile *dwarf2_per_objfile)
+dwarf2_read_gdb_index (struct dwarf2_per_objfile *dwarf2_per_objfile)
 {
   const gdb_byte *cu_list, *types_list, *dwz_list = NULL;
   offset_type cu_list_elements, types_list_elements, dwz_list_elements = 0;
   struct objfile *objfile = dwarf2_per_objfile->objfile;
 
   std::unique_ptr<struct mapped_index> map (new struct mapped_index);
-  if (!read_index_from_section (objfile, objfile_name (objfile),
-                               use_deprecated_index_sections,
-                               &dwarf2_per_objfile->gdb_index, map.get (),
-                               &cu_list, &cu_list_elements,
-                               &types_list, &types_list_elements))
+  if (!read_gdb_index_from_section (objfile, objfile_name (objfile),
+                                   use_deprecated_index_sections,
+                                   &dwarf2_per_objfile->gdb_index, map.get (),
+                                   &cu_list, &cu_list_elements,
+                                   &types_list, &types_list_elements))
     return 0;
 
   /* Don't use the index if it's empty.  */
       const gdb_byte *dwz_types_ignore;
       offset_type dwz_types_elements_ignore;
 
-      if (!read_index_from_section (objfile, bfd_get_filename (dwz->dwz_bfd),
-                                   1,
-                                   &dwz->gdb_index, &dwz_map,
-                                   &dwz_list, &dwz_list_elements,
-                                   &dwz_types_ignore,
-                                   &dwz_types_elements_ignore))
+      if (!read_gdb_index_from_section (objfile,
+                                       bfd_get_filename (dwz->dwz_bfd), 1,
+                                       &dwz->gdb_index, &dwz_map,
+                                       &dwz_list, &dwz_list_elements,
+                                       &dwz_types_ignore,
+                                       &dwz_types_elements_ignore))
        {
          warning (_("could not read '.gdb_index' section from %s; skipping"),
                   bfd_get_filename (dwz->dwz_bfd));
       return true;
     }
 
-  if (dwarf2_read_index (dwarf2_per_objfile))
+  if (dwarf2_read_gdb_index (dwarf2_per_objfile))
     {
       *index_kind = dw_index_kind::GDB_INDEX;
       return true;