gdb/doc: space out list entries, fix one type
[deliverable/binutils-gdb.git] / gdb / mips-sde-tdep.c
index 0246b27bbad3467da9097d75e212cd3f3069b5b8..1d282c219e56a5d9b82bd01cc3e9ff07f2ba55e9 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for SDE on MIPS processors.
 
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -48,7 +48,7 @@ mips_sde_frame_cache (struct frame_info *this_frame, void **this_cache)
   int i;
 
   if (*this_cache != NULL)
-    return *this_cache;
+    return (struct trad_frame_cache *) *this_cache;
   cache = trad_frame_cache_zalloc (this_frame);
   *this_cache = cache;
 
@@ -205,10 +205,10 @@ static void
 mips_sde_elf_osabi_sniff_abi_tag_sections (bfd *abfd, asection *sect,
                                           void *obj)
 {
-  enum gdb_osabi *os_ident_ptr = obj;
+  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,11 +255,9 @@ mips_sde_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
   frame_base_append_sniffer (gdbarch, mips_sde_frame_base_sniffer);
 }
 
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-extern initialize_file_ftype _initialize_mips_sde_tdep;
-
+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.02522 seconds and 4 git commands to generate.