[gdb/testsuite] Fix gdb.dwarf2/dw2-filename.exp with -readnow
[deliverable/binutils-gdb.git] / gdb / mips-sde-tdep.c
index 0645d86878c2c9e13a5398ecafb271d87824a5ef..1d282c219e56a5d9b82bd01cc3e9ff07f2ba55e9 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for SDE on MIPS processors.
 
-   Copyright (C) 2014-2018 Free Software Foundation, Inc.
+   Copyright (C) 2014-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -208,7 +208,7 @@ mips_sde_elf_osabi_sniff_abi_tag_sections (bfd *abfd, asection *sect,
   enum gdb_osabi *os_ident_ptr = (enum gdb_osabi *) obj;
   const char *name;
 
-  name = bfd_get_section_name (abfd, sect);
+  name = bfd_section_name (sect);
 
   /* The presence of a section with a ".sde" prefix is indicative
      of an SDE binary.  */
@@ -226,9 +226,8 @@ mips_sde_elf_osabi_sniffer (bfd *abfd)
 
   /* If the generic sniffer gets a hit, return and let other sniffers
      get a crack at it.  */
-  bfd_map_over_sections (abfd,
-                        generic_elf_osabi_sniff_abi_tag_sections,
-                        &osabi);
+  for (asection *sect : gdb_bfd_sections (abfd))
+    generic_elf_osabi_sniff_abi_tag_sections (abfd, sect, &osabi);
   if (osabi != GDB_OSABI_UNKNOWN)
     return GDB_OSABI_UNKNOWN;
 
@@ -256,8 +255,9 @@ mips_sde_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
   frame_base_append_sniffer (gdbarch, mips_sde_frame_base_sniffer);
 }
 
+void _initialize_mips_sde_tdep ();
 void
-_initialize_mips_sde_tdep (void)
+_initialize_mips_sde_tdep ()
 {
   gdbarch_register_osabi_sniffer (bfd_arch_mips,
                                  bfd_target_elf_flavour,
This page took 0.025423 seconds and 4 git commands to generate.