* dbxread.c, i386-pinsn.c, i386-tdep.c, regex.c, solib.c, symmisc.c,
[deliverable/binutils-gdb.git] / gdb / mipsread.c
index 89fe0500e22244df96a70a59114cd5f253fca2cd..b4a81f18344f4e898cc22c23c44eccac7eb87e10 100644 (file)
@@ -67,16 +67,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include <sys/param.h>
 #include <sys/file.h>
 #include <sys/stat.h>
-#include <strings.h>
-
-/* Undo brain-damage in some <strings.h> that '#define index strchr'.
-   Note that tm-mips.h includes coff/sym.h, which has a structure with a
-   member named 'index'. */
-#undef index
 
 #include "coff/mips.h"         /* COFF-like aspects of ecoff files */
 #include "coff/ecoff-ext.h"    /* External forms of ecoff sym structures */
 
+#include "libbfd.h"            /* FIXME Secret internal BFD stuff (bfd_read) */
 #include "libaout.h"           /* FIXME Secret internal BFD stuff for a.out */
 #include "aout/aout64.h"
 #include "aout/stab_gnu.h"     /* STABS information */
@@ -346,8 +341,6 @@ mipscoff_symfile_read (objfile, addr, mainline)
      CORE_ADDR addr;
      int mainline;
 {
-  bfd *abfd = objfile -> obfd;
-
   init_minimal_symbol_collection ();
   make_cleanup (discard_minimal_symbols, 0);
 
@@ -391,10 +384,10 @@ static PTR
 xzalloc(size)
      unsigned int size;
 {
-       PTR p = xmalloc(size);
+  PTR p = xmalloc (size);
 
-       memset(p, 0, size);
-       return p;
+  (void) memset (p, 0, size);
+  return p;
 }
 
 /* Exported procedure: Builds a symtab from the PST partial one.
@@ -530,6 +523,7 @@ fixup_symtab (hdr, data, f_ptr, abfd)
        /* This function depends on the external and internal forms
           of the MIPS symbol table taking identical space.  Check this
           assumption at compile-time.  */
+#if 0  /* FIXME: Unused */
        static check_hdr1[1 + sizeof (struct hdr_ext) - sizeof (HDRR)] = {0};
        static check_hdr2[1 + sizeof (HDRR) - sizeof (struct hdr_ext)] = {0};
        static check_fdr1[1 + sizeof (struct fdr_ext) - sizeof (FDR)] = {0};
@@ -542,6 +536,7 @@ fixup_symtab (hdr, data, f_ptr, abfd)
        static check_ext2[1 + sizeof (EXTR) - sizeof (struct ext_ext)] = {0};
        static check_rfd1[1 + sizeof (struct rfd_ext) - sizeof (RFDT)] = {0};
        static check_rfd2[1 + sizeof (RFDT) - sizeof (struct rfd_ext)] = {0};
+#endif
 
        /* Swap in the header record.  */
        ecoff_swap_hdr_in (abfd, hdr, hdr);
@@ -851,6 +846,8 @@ add_pending(fh, sh, t)
 /* Throw away undef entries when done with file index F_IDX */
 /* FIXME -- storage leak.  This is never called!!!   --gnu */
 
+#if 0
+
 static void
 free_pending(f_idx)
        int f_idx;
@@ -864,6 +861,8 @@ free_pending(f_idx)
        pending_list[f_idx] = 0;
 }
 
+#endif
+
 static char *
 prepend_tag_kind(tag_name, type_code)
      char *tag_name;
@@ -1455,7 +1454,8 @@ parse_type(ax, bs, bigend)
                ax += cross_ref(ax, &tp, type_code, &pn, bigend);
                /* reading .o file ? */
                if (UNSAFE_DATA_ADDR(tp))
-                   tp = init_type(type_code, 0, 0, 0, (struct objfile *) NULL);
+                   tp = init_type(type_code, 0, 0, (char *) NULL,
+                                  (struct objfile *) NULL);
                /* SOMEONE OUGHT TO FIX DBXREAD TO DROP "STRUCT" */
                sprintf(name, fmt, pn);
 
@@ -1545,7 +1545,8 @@ upgrade_type(tpp, tq, ax, bigend)
 
        case tqArray:
                off = 0;
-               t = init_type(TYPE_CODE_ARRAY, 0, 0, 0, (struct objfile *) NULL);
+               t = init_type(TYPE_CODE_ARRAY, 0, 0, (char *) NULL,
+                             (struct objfile *) NULL);
                TYPE_TARGET_TYPE(t) = *tpp;
 
                /* Determine and record the domain type (type of index) */
@@ -1634,7 +1635,6 @@ parse_procedure (pr, bound, have_stabs)
     SYMR *sh = (SYMR*)pr->isym;
     struct block *b;
     struct mips_extra_func_info *e;
-    char name[100];
     char *sh_name;
 
     /* Static procedure at address pr->adr.  Sigh. */
@@ -2351,7 +2351,6 @@ psymtab_to_symtab_1(pst, filename)
         * This symbol table contains stabs-in-ecoff entries.
         */
 
-       SYMR *sh;
        PDR *pr;
        
        /* Parse local symbols first */
@@ -2580,7 +2579,8 @@ cross_ref(ax, tpp, type_code, pname, bigend)
                    if (p)
                        *tpp = p->t;
                    else {
-                       *tpp = init_type(type_code, 0, 0, 0, (struct objfile *) NULL);
+                       *tpp = init_type(type_code, 0, 0, (char *) NULL,
+                                        (struct objfile *) NULL);
                        add_pending(fh, sh, *tpp);
                    }
                }
@@ -2997,7 +2997,8 @@ fixup_sigtramp()
         */
        SYMBOL_NAMESPACE(s) = VAR_NAMESPACE;
        SYMBOL_CLASS(s) = LOC_BLOCK;
-       SYMBOL_TYPE(s) = init_type(TYPE_CODE_FUNC, 4, 0, 0, (struct objfile *) NULL);
+       SYMBOL_TYPE(s) = init_type(TYPE_CODE_FUNC, 4, 0, (char *) NULL,
+                                  (struct objfile *) NULL);
        TYPE_TARGET_TYPE(SYMBOL_TYPE(s)) = builtin_type_void;
 
        /* Need a block to allocate .gdbinfo. in */
This page took 0.025944 seconds and 4 git commands to generate.