Rewrite gdb.asm so that it doesn't assume a C comiler (or any C
[deliverable/binutils-gdb.git] / gdb / mipsread.c
index 94e70a9c4f9b0af0d4b8a7d9a1d3d5155b08b4c9..2c90b5612d5603885665dbe6615b3b9889d85274 100644 (file)
 #include "elf/common.h"
 #include "elf/mips.h"
 
-extern void _initialize_mipsread PARAMS ((void));
+extern void _initialize_mipsread (void);
 
-static void
-mipscoff_new_init PARAMS ((struct objfile *));
+static void mipscoff_new_init (struct objfile *);
 
-static void
-mipscoff_symfile_init PARAMS ((struct objfile *));
+static void mipscoff_symfile_init (struct objfile *);
 
-static void
-mipscoff_symfile_read PARAMS ((struct objfile *, struct section_offsets *,
-                              int));
+static void mipscoff_symfile_read (struct objfile *, int);
 
-static void
-mipscoff_symfile_finish PARAMS ((struct objfile *));
+static void mipscoff_symfile_finish (struct objfile *);
 
 static void
-read_alphacoff_dynamic_symtab PARAMS ((struct section_offsets *,
-                                      struct objfile * objfile));
+read_alphacoff_dynamic_symtab (struct section_offsets *,
+                              struct objfile *objfile);
 
 /* Initialize anything that needs initializing when a completely new
    symbol file is specified (not just adding some symbols from another
@@ -87,16 +82,15 @@ mipscoff_symfile_init (objfile)
 /* Read a symbol file from a file.  */
 
 static void
-mipscoff_symfile_read (objfile, section_offsets, mainline)
+mipscoff_symfile_read (objfile, mainline)
      struct objfile *objfile;
-     struct section_offsets *section_offsets;
      int mainline;
 {
   bfd *abfd = objfile->obfd;
   struct cleanup *back_to;
 
   init_minimal_symbol_collection ();
-  back_to = make_cleanup ((make_cleanup_func) discard_minimal_symbols, 0);
+  back_to = make_cleanup_discard_minimal_symbols ();
 
   /* Now that the executable file is positioned at symbol table,
      process it and define symbols accordingly.  */
@@ -106,11 +100,11 @@ mipscoff_symfile_read (objfile, section_offsets, mainline)
     error ("Error reading symbol table: %s", bfd_errmsg (bfd_get_error ()));
 
   mdebug_build_psymtabs (objfile, &ecoff_backend (abfd)->debug_swap,
-                        &ecoff_data (abfd)->debug_info, section_offsets);
+                        &ecoff_data (abfd)->debug_info);
 
   /* Add alpha coff dynamic symbols.  */
 
-  read_alphacoff_dynamic_symtab (section_offsets, objfile);
+  read_alphacoff_dynamic_symtab (objfile->section_offsets, objfile);
 
   /* Install any minimal symbols that have been collected as the current
      minimal symbols for this objfile. */
@@ -196,8 +190,7 @@ struct alphacoff_dynsecinfo
     asection *got_sect;                /* Section pointer for .got section */
   };
 
-static void
-alphacoff_locate_sections PARAMS ((bfd *, asection *, void *));
+static void alphacoff_locate_sections (bfd *, asection *, void *);
 
 /* We are called once per section from read_alphacoff_dynamic_symtab.
    We need to examine each section we are passed, check to see
@@ -404,7 +397,7 @@ read_alphacoff_dynamic_symtab (section_offsets, objfile)
                ms_type = mst_text;
              else
                ms_type = mst_file_text;
-             sym_value += ANOFFSET (section_offsets, SECT_OFF_TEXT);
+             sym_value += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
            }
          else if (sym_shndx == SHN_MIPS_DATA)
            {
@@ -412,7 +405,7 @@ read_alphacoff_dynamic_symtab (section_offsets, objfile)
                ms_type = mst_data;
              else
                ms_type = mst_file_data;
-             sym_value += ANOFFSET (section_offsets, SECT_OFF_DATA);
+             sym_value += ANOFFSET (section_offsets, SECT_OFF_DATA (objfile));
            }
          else if (sym_shndx == SHN_MIPS_ACOMMON)
            {
@@ -420,7 +413,7 @@ read_alphacoff_dynamic_symtab (section_offsets, objfile)
                ms_type = mst_bss;
              else
                ms_type = mst_file_bss;
-             sym_value += ANOFFSET (section_offsets, SECT_OFF_BSS);
+             sym_value += ANOFFSET (section_offsets, SECT_OFF_BSS (objfile));
            }
          else if (sym_shndx == SHN_ABS)
            {
This page took 0.025784 seconds and 4 git commands to generate.