2001-07-11 H.J. Lu <hjl@gnu.org>
[deliverable/binutils-gdb.git] / gdb / mdebugread.c
index c1984054e0dc7d741ac8cc991724bfca5e66a416..aab357e005e5779f1906275b3566944baa52359e 100644 (file)
@@ -1,5 +1,6 @@
 /* Read a symbol table in ECOFF format (Third-Eye).
-   Copyright 1986, 87, 89, 90, 91, 92, 93, 94, 95, 96, 97, 1998
+   Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
+   1997, 1998, 1999, 2000, 2001
    Free Software Foundation, Inc.
    Original version contributed by Alessandro Forin (af@cs.cmu.edu) at
    CMU.  Major work by Per Bothner, John Gilmore and Ian Lance Taylor
@@ -78,8 +79,6 @@ typedef struct mips_extra_func_info
 #include "gdb_stat.h"
 #include "gdb_string.h"
 
-#include "gdb-stabs.h"
-
 #include "bfd.h"
 
 #include "coff/ecoff.h"                /* COFF-like aspects of ecoff files */
@@ -93,11 +92,6 @@ typedef struct mips_extra_func_info
 
 extern void _initialize_mdebugread (void);
 
-/* Provide a default mapping from a ecoff register number to a gdb REGNUM.  */
-#ifndef ECOFF_REG_TO_REGNUM
-#define ECOFF_REG_TO_REGNUM(num) (num)
-#endif
-
 /* Provide a way to test if we have both ECOFF and ELF symbol tables.  
    We use this define in order to know whether we should override a 
    symbol's ECOFF section with its ELF section.  This is necessary in 
@@ -384,7 +378,7 @@ static PTR xzalloc (unsigned int);
 
 static void sort_blocks (struct symtab *);
 
-static int compare_blocks (const void *, const void *);
+static int compare_blocks (const PTR, const PTR);
 
 static struct partial_symtab *new_psymtab (char *, struct objfile *);
 
@@ -2291,7 +2285,7 @@ parse_partial_symbols (struct objfile *objfile)
      Minor hack: -O3 images might claim some global data belongs
      to FDR -1. We`ll go along with that */
   fdr_to_pst = (struct pst_map *) xzalloc ((hdr->ifdMax + 1) * sizeof *fdr_to_pst);
-  old_chain = make_cleanup (free, fdr_to_pst);
+  old_chain = make_cleanup (xfree, fdr_to_pst);
   fdr_to_pst++;
   {
     struct partial_symtab *pst = new_psymtab ("", objfile);
@@ -2309,7 +2303,7 @@ parse_partial_symbols (struct objfile *objfile)
 
   /* Pass 0 over external syms: swap them in.  */
   ext_block = (EXTR *) xmalloc (hdr->iextMax * sizeof (EXTR));
-  make_cleanup (free, ext_block);
+  make_cleanup (xfree, ext_block);
 
   ext_out = (char *) debug_info->external_ext;
   ext_out_end = ext_out + hdr->iextMax * external_ext_size;
@@ -2709,7 +2703,7 @@ parse_partial_symbols (struct objfile *objfile)
 
                if (stabstring
                    && stabstring != debug_info->ss + fh->issBase + sh.iss)
-                 free (stabstring);
+                 xfree (stabstring);
              }
              /* end - Handle continuation */
            }
@@ -2948,7 +2942,7 @@ parse_partial_symbols (struct objfile *objfile)
              CORE_ADDR svalue;
 
              if (ext_ptr->ifd != f_idx)
-               abort ();
+               internal_error (__FILE__, __LINE__, "failed internal consistency check");
              psh = &ext_ptr->asym;
 
              /* Do not add undefined symbols to the partial symbol table.  */
@@ -3399,7 +3393,7 @@ psymtab_to_symtab_1 (struct partial_symtab *pst, char *filename)
          PDR *pdr_in_end;
 
          pr_block = (PDR *) xmalloc (fh->cpd * sizeof (PDR));
-         old_chain = make_cleanup (free, pr_block);
+         old_chain = make_cleanup (xfree, pr_block);
 
          pdr_ptr = ((char *) debug_info->external_pdr
                     + fh->ipdFirst * external_pdr_size);
@@ -3508,7 +3502,7 @@ psymtab_to_symtab_1 (struct partial_symtab *pst, char *filename)
 
              pr_block = (PDR *) xmalloc (fh->cpd * sizeof (PDR));
 
-             old_chain = make_cleanup (free, pr_block);
+             old_chain = make_cleanup (xfree, pr_block);
 
              pdr_ptr = ((char *) debug_info->external_pdr
                         + fh->ipdFirst * external_pdr_size);
This page took 0.024301 seconds and 4 git commands to generate.