2003-04-08 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / symmisc.c
index ca40a69f75a63945aeaa97aef201b0094832075b..f6e78ebc98ed9a6d519436cd788ac0eaf0b5aede 100644 (file)
@@ -1,6 +1,8 @@
 /* Do various things to symbol tables (other than lookup), for GDB.
-   Copyright 1986, 87, 89, 91, 92, 93, 94, 95, 96, 1998
-   Free Software Foundation, Inc.
+
+   Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+   1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003 Free Software
+   Foundation, Inc.
 
    This file is part of GDB.
 
 #include "objfiles.h"
 #include "breakpoint.h"
 #include "command.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
 #include "language.h"
 #include "bcache.h"
+#include "block.h"
 
 #include "gdb_string.h"
+#include <readline/readline.h>
 
 #ifndef DEV_TTY
 #define DEV_TTY "/dev/tty"
@@ -49,53 +53,56 @@ FILE *std_err;
 
 /* Prototypes for local functions */
 
-static void dump_symtab PARAMS ((struct objfile *, struct symtab *,
-                                GDB_FILE *));
+static void dump_symtab (struct objfile *, struct symtab *,
+                        struct ui_file *);
 
-static void dump_psymtab PARAMS ((struct objfile *, struct partial_symtab *,
-                                 GDB_FILE *));
+static void dump_psymtab (struct objfile *, struct partial_symtab *,
+                         struct ui_file *);
 
-static void dump_msymbols PARAMS ((struct objfile *, GDB_FILE *));
+static void dump_msymbols (struct objfile *, struct ui_file *);
 
-static void dump_objfile PARAMS ((struct objfile *));
+static void dump_objfile (struct objfile *);
 
-static int block_depth PARAMS ((struct block *));
+static int block_depth (struct block *);
 
-static void print_partial_symbols PARAMS ((struct partial_symbol **, int,
-                                          char *, GDB_FILE *));
+static void print_partial_symbols (struct partial_symbol **, int,
+                                  char *, struct ui_file *);
 
-static void free_symtab_block PARAMS ((struct objfile *, struct block *));
+static void free_symtab_block (struct objfile *, struct block *);
 
-void _initialize_symmisc PARAMS ((void));
+void _initialize_symmisc (void);
 
 struct print_symbol_args
   {
     struct symbol *symbol;
     int depth;
-    GDB_FILE *outfile;
+    struct ui_file *outfile;
   };
 
-static int print_symbol PARAMS ((PTR));
+static int print_symbol (void *);
 
-static void
-free_symtab_block PARAMS ((struct objfile *, struct block *));
+static void free_symtab_block (struct objfile *, struct block *);
 \f
 
 /* Free a struct block <- B and all the symbols defined in that block.  */
 
 static void
-free_symtab_block (objfile, b)
-     struct objfile *objfile;
-     struct block *b;
+free_symtab_block (struct objfile *objfile, struct block *b)
 {
   register int i, n;
-  n = BLOCK_NSYMS (b);
+  struct symbol *sym, *next_sym;
+
+  n = BLOCK_BUCKETS (b);
   for (i = 0; i < n; i++)
     {
-      mfree (objfile->md, SYMBOL_NAME (BLOCK_SYM (b, i)));
-      mfree (objfile->md, (PTR) BLOCK_SYM (b, i));
+      for (sym = BLOCK_BUCKET (b, i); sym; sym = next_sym)
+       {
+         next_sym = sym->hash_next;
+         xmfree (objfile->md, DEPRECATED_SYMBOL_NAME (sym));
+         xmfree (objfile->md, sym);
+       }
     }
-  mfree (objfile->md, (PTR) b);
+  xmfree (objfile->md, b);
 }
 
 /* Free all the storage associated with the struct symtab <- S.
@@ -107,8 +114,7 @@ free_symtab_block (objfile, b)
    It is s->free_code that says which alternative to use.  */
 
 void
-free_symtab (s)
-     register struct symtab *s;
+free_symtab (register struct symtab *s)
 {
   register int i, n;
   register struct blockvector *bv;
@@ -130,7 +136,7 @@ free_symtab (s)
       for (i = 0; i < n; i++)
        free_symtab_block (s->objfile, BLOCKVECTOR_BLOCK (bv, i));
       /* Free the blockvector itself.  */
-      mfree (s->objfile->md, (PTR) bv);
+      xmfree (s->objfile->md, bv);
       /* Also free the linetable.  */
 
     case free_linetable:
@@ -138,26 +144,26 @@ free_symtab (s)
          or by some other symtab, except for our linetable.
          Free that now.  */
       if (LINETABLE (s))
-       mfree (s->objfile->md, (PTR) LINETABLE (s));
+       xmfree (s->objfile->md, LINETABLE (s));
       break;
     }
 
   /* If there is a single block of memory to free, free it.  */
   if (s->free_ptr != NULL)
-    mfree (s->objfile->md, s->free_ptr);
+    xmfree (s->objfile->md, s->free_ptr);
 
   /* Free source-related stuff */
   if (s->line_charpos != NULL)
-    mfree (s->objfile->md, (PTR) s->line_charpos);
+    xmfree (s->objfile->md, s->line_charpos);
   if (s->fullname != NULL)
-    mfree (s->objfile->md, s->fullname);
+    xmfree (s->objfile->md, s->fullname);
   if (s->debugformat != NULL)
-    mfree (s->objfile->md, s->debugformat);
-  mfree (s->objfile->md, (PTR) s);
+    xmfree (s->objfile->md, s->debugformat);
+  xmfree (s->objfile->md, s);
 }
 
 void
-print_symbol_bcache_statistics ()
+print_symbol_bcache_statistics (void)
 {
   struct objfile *objfile;
 
@@ -165,15 +171,18 @@ print_symbol_bcache_statistics ()
   ALL_OBJFILES (objfile)
   {
     printf_filtered ("Byte cache statistics for '%s':\n", objfile->name);
-    print_bcache_statistics (&objfile->psymbol_cache, "partial symbol cache");
+    print_bcache_statistics (objfile->psymbol_cache, "partial symbol cache");
   }
   immediate_quit--;
 }
 
 void
-print_objfile_statistics ()
+print_objfile_statistics (void)
 {
   struct objfile *objfile;
+  struct symtab *s;
+  struct partial_symtab *ps;
+  int i, linetables, blockvectors;
 
   immediate_quit++;
   ALL_OBJFILES (objfile)
@@ -194,13 +203,37 @@ print_objfile_statistics ()
     if (OBJSTAT (objfile, n_types) > 0)
       printf_filtered ("  Number of \"types\" defined: %d\n",
                       OBJSTAT (objfile, n_types));
+    i = 0;
+    ALL_OBJFILE_PSYMTABS (objfile, ps)
+      {
+        if (ps->readin == 0)
+          i++;
+      }
+    printf_filtered ("  Number of psym tables (not yet expanded): %d\n", i);
+    i = linetables = blockvectors = 0;
+    ALL_OBJFILE_SYMTABS (objfile, s)
+      {
+        i++;
+        if (s->linetable != NULL)
+          linetables++;
+        if (s->primary == 1)
+          blockvectors++;
+      }
+    printf_filtered ("  Number of symbol tables: %d\n", i);
+    printf_filtered ("  Number of symbol tables with line tables: %d\n", 
+                     linetables);
+    printf_filtered ("  Number of symbol tables with blockvectors: %d\n", 
+                     blockvectors);
+    
     if (OBJSTAT (objfile, sz_strtab) > 0)
       printf_filtered ("  Space used by a.out string tables: %d\n",
                       OBJSTAT (objfile, sz_strtab));
     printf_filtered ("  Total memory used for psymbol obstack: %d\n",
                     obstack_memory_used (&objfile->psymbol_obstack));
     printf_filtered ("  Total memory used for psymbol cache: %d\n",
-                    obstack_memory_used (&objfile->psymbol_cache.cache));
+                    bcache_memory_used (objfile->psymbol_cache));
+    printf_filtered ("  Total memory used for macro cache: %d\n",
+                    bcache_memory_used (objfile->macro_cache));
     printf_filtered ("  Total memory used for symbol obstack: %d\n",
                     obstack_memory_used (&objfile->symbol_obstack));
     printf_filtered ("  Total memory used for type obstack: %d\n",
@@ -210,17 +243,16 @@ print_objfile_statistics ()
 }
 
 static void
-dump_objfile (objfile)
-     struct objfile *objfile;
+dump_objfile (struct objfile *objfile)
 {
   struct symtab *symtab;
   struct partial_symtab *psymtab;
 
   printf_filtered ("\nObject file %s:  ", objfile->name);
   printf_filtered ("Objfile at ");
-  gdb_print_address (objfile, gdb_stdout);
+  gdb_print_host_address (objfile, gdb_stdout);
   printf_filtered (", bfd at ");
-  gdb_print_address (objfile->obfd, gdb_stdout);
+  gdb_print_host_address (objfile->obfd, gdb_stdout);
   printf_filtered (", %d minsyms\n\n",
                   objfile->minimal_symbol_count);
 
@@ -233,7 +265,7 @@ dump_objfile (objfile)
        {
          printf_filtered ("%s at ",
                           psymtab->filename);
-         gdb_print_address (psymtab, gdb_stdout);
+         gdb_print_host_address (psymtab, gdb_stdout);
          printf_filtered (", ");
          if (psymtab->objfile != objfile)
            {
@@ -252,7 +284,7 @@ dump_objfile (objfile)
           symtab = symtab->next)
        {
          printf_filtered ("%s at ", symtab->filename);
-         gdb_print_address (symtab, gdb_stdout);
+         gdb_print_host_address (symtab, gdb_stdout);
          printf_filtered (", ");
          if (symtab->objfile != objfile)
            {
@@ -267,9 +299,7 @@ dump_objfile (objfile)
 /* Print minimal symbols from this objfile.  */
 
 static void
-dump_msymbols (objfile, outfile)
-     struct objfile *objfile;
-     GDB_FILE *outfile;
+dump_msymbols (struct objfile *objfile, struct ui_file *outfile)
 {
   struct minimal_symbol *msymbol;
   int index;
@@ -282,7 +312,7 @@ dump_msymbols (objfile, outfile)
       return;
     }
   for (index = 0, msymbol = objfile->msymbols;
-       SYMBOL_NAME (msymbol) != NULL; msymbol++, index++)
+       DEPRECATED_SYMBOL_NAME (msymbol) != NULL; msymbol++, index++)
     {
       switch (msymbol->type)
        {
@@ -319,7 +349,7 @@ dump_msymbols (objfile, outfile)
        }
       fprintf_filtered (outfile, "[%2d] %c ", index, ms_type);
       print_address_numeric (SYMBOL_VALUE_ADDRESS (msymbol), 1, outfile);
-      fprintf_filtered (outfile, " %s", SYMBOL_NAME (msymbol));
+      fprintf_filtered (outfile, " %s", DEPRECATED_SYMBOL_NAME (msymbol));
       if (SYMBOL_BFD_SECTION (msymbol))
        fprintf_filtered (outfile, " section %s",
                          bfd_section_name (objfile->obfd,
@@ -343,30 +373,28 @@ dump_msymbols (objfile, outfile)
 }
 
 static void
-dump_psymtab (objfile, psymtab, outfile)
-     struct objfile *objfile;
-     struct partial_symtab *psymtab;
-     GDB_FILE *outfile;
+dump_psymtab (struct objfile *objfile, struct partial_symtab *psymtab,
+             struct ui_file *outfile)
 {
   int i;
 
   fprintf_filtered (outfile, "\nPartial symtab for source file %s ",
                    psymtab->filename);
   fprintf_filtered (outfile, "(object ");
-  gdb_print_address (psymtab, outfile);
+  gdb_print_host_address (psymtab, outfile);
   fprintf_filtered (outfile, ")\n\n");
   fprintf_unfiltered (outfile, "  Read from object file %s (",
                      objfile->name);
-  gdb_print_address (objfile, outfile);
+  gdb_print_host_address (objfile, outfile);
   fprintf_unfiltered (outfile, ")\n");
 
   if (psymtab->readin)
     {
       fprintf_filtered (outfile,
                        "  Full symtab was read (at ");
-      gdb_print_address (psymtab->symtab, outfile);
+      gdb_print_host_address (psymtab->symtab, outfile);
       fprintf_filtered (outfile, " by function at ");
-      gdb_print_address ((PTR) psymtab->read_symtab, outfile);
+      gdb_print_host_address (psymtab->read_symtab, outfile);
       fprintf_filtered (outfile, ")\n");
     }
 
@@ -392,7 +420,7 @@ dump_psymtab (objfile, psymtab, outfile)
   for (i = 0; i < psymtab->number_of_dependencies; i++)
     {
       fprintf_filtered (outfile, "    %d ", i);
-      gdb_print_address (psymtab->dependencies[i], outfile);
+      gdb_print_host_address (psymtab->dependencies[i], outfile);
       fprintf_filtered (outfile, " %s\n",
                        psymtab->dependencies[i]->filename);
     }
@@ -412,15 +440,14 @@ dump_psymtab (objfile, psymtab, outfile)
 }
 
 static void
-dump_symtab (objfile, symtab, outfile)
-     struct objfile *objfile;
-     struct symtab *symtab;
-     GDB_FILE *outfile;
+dump_symtab (struct objfile *objfile, struct symtab *symtab,
+            struct ui_file *outfile)
 {
   register int i, j;
   int len, blen;
   register struct linetable *l;
   struct blockvector *bv;
+  struct symbol *sym;
   register struct block *b;
   int depth;
 
@@ -429,7 +456,7 @@ dump_symtab (objfile, symtab, outfile)
     fprintf_filtered (outfile, "Compilation directory is %s\n",
                      symtab->dirname);
   fprintf_filtered (outfile, "Read from object file %s (", objfile->name);
-  gdb_print_address (objfile, outfile);
+  gdb_print_host_address (objfile, outfile);
   fprintf_filtered (outfile, ")\n");
   fprintf_filtered (outfile, "Language: %s\n", language_str (symtab->language));
 
@@ -459,20 +486,26 @@ dump_symtab (objfile, symtab, outfile)
          depth = block_depth (b) * 2;
          print_spaces (depth, outfile);
          fprintf_filtered (outfile, "block #%03d, object at ", i);
-         gdb_print_address (b, outfile);
+         gdb_print_host_address (b, outfile);
          if (BLOCK_SUPERBLOCK (b))
            {
              fprintf_filtered (outfile, " under ");
-             gdb_print_address (BLOCK_SUPERBLOCK (b), outfile);
+             gdb_print_host_address (BLOCK_SUPERBLOCK (b), outfile);
            }
-         blen = BLOCK_NSYMS (b);
-         fprintf_filtered (outfile, ", %d syms in ", blen);
+         /* drow/2002-07-10: We could save the total symbols count
+            even if we're using a hashtable, but nothing else but this message
+            wants it.  */
+         blen = BLOCK_BUCKETS (b);
+         if (BLOCK_HASHTABLE (b))
+           fprintf_filtered (outfile, ", %d buckets in ", blen);
+         else
+           fprintf_filtered (outfile, ", %d syms in ", blen);
          print_address_numeric (BLOCK_START (b), 1, outfile);
          fprintf_filtered (outfile, "..");
          print_address_numeric (BLOCK_END (b), 1, outfile);
          if (BLOCK_FUNCTION (b))
            {
-             fprintf_filtered (outfile, ", function %s", SYMBOL_NAME (BLOCK_FUNCTION (b)));
+             fprintf_filtered (outfile, ", function %s", DEPRECATED_SYMBOL_NAME (BLOCK_FUNCTION (b)));
              if (SYMBOL_DEMANGLED_NAME (BLOCK_FUNCTION (b)) != NULL)
                {
                  fprintf_filtered (outfile, ", %s",
@@ -482,11 +515,12 @@ dump_symtab (objfile, symtab, outfile)
          if (BLOCK_GCC_COMPILED (b))
            fprintf_filtered (outfile, ", compiled with gcc%d", BLOCK_GCC_COMPILED (b));
          fprintf_filtered (outfile, "\n");
-         /* Now print each symbol in this block */
-         for (j = 0; j < blen; j++)
+         /* Now print each symbol in this block (in no particular order, if
+            we're using a hashtable).  */
+         ALL_BLOCK_SYMBOLS (b, j, sym)
            {
              struct print_symbol_args s;
-             s.symbol = BLOCK_SYM (b, j);
+             s.symbol = sym;
              s.depth = depth + 1;
              s.outfile = outfile;
              catch_errors (print_symbol, &s, "Error printing symbol:\n",
@@ -502,12 +536,10 @@ dump_symtab (objfile, symtab, outfile)
 }
 
 void
-maintenance_print_symbols (args, from_tty)
-     char *args;
-     int from_tty;
+maintenance_print_symbols (char *args, int from_tty)
 {
   char **argv;
-  GDB_FILE *outfile;
+  struct ui_file *outfile;
   struct cleanup *cleanups;
   char *symname = NULL;
   char *filename = DEV_TTY;
@@ -538,12 +570,12 @@ Arguments missing: an output file name and an optional symbol file name");
     }
 
   filename = tilde_expand (filename);
-  make_cleanup (free, filename);
+  make_cleanup (xfree, filename);
 
   outfile = gdb_fopen (filename, FOPEN_WT);
   if (outfile == 0)
     perror_with_name (filename);
-  make_cleanup ((make_cleanup_func) gdb_fclose, (char *) &outfile);
+  make_cleanup_ui_file_delete (outfile);
 
   immediate_quit++;
   ALL_SYMTABS (objfile, s)
@@ -559,17 +591,16 @@ Arguments missing: an output file name and an optional symbol file name");
    1 for success.  */
 
 static int
-print_symbol (args)
-     PTR args;
+print_symbol (void *args)
 {
   struct symbol *symbol = ((struct print_symbol_args *) args)->symbol;
   int depth = ((struct print_symbol_args *) args)->depth;
-  GDB_FILE *outfile = ((struct print_symbol_args *) args)->outfile;
+  struct ui_file *outfile = ((struct print_symbol_args *) args)->outfile;
 
   print_spaces (depth, outfile);
   if (SYMBOL_NAMESPACE (symbol) == LABEL_NAMESPACE)
     {
-      fprintf_filtered (outfile, "label %s at ", SYMBOL_SOURCE_NAME (symbol));
+      fprintf_filtered (outfile, "label %s at ", SYMBOL_PRINT_NAME (symbol));
       print_address_numeric (SYMBOL_VALUE_ADDRESS (symbol), 1, outfile);
       if (SYMBOL_BFD_SECTION (symbol))
        fprintf_filtered (outfile, " section %s\n",
@@ -592,7 +623,7 @@ print_symbol (args)
                          ? "enum"
                     : (TYPE_CODE (SYMBOL_TYPE (symbol)) == TYPE_CODE_STRUCT
                        ? "struct" : "union")),
-                           SYMBOL_NAME (symbol));
+                           DEPRECATED_SYMBOL_NAME (symbol));
          LA_PRINT_TYPE (SYMBOL_TYPE (symbol), "", outfile, 1, depth);
        }
       fprintf_filtered (outfile, ";\n");
@@ -604,14 +635,14 @@ print_symbol (args)
       if (SYMBOL_TYPE (symbol))
        {
          /* Print details of types, except for enums where it's clutter.  */
-         LA_PRINT_TYPE (SYMBOL_TYPE (symbol), SYMBOL_SOURCE_NAME (symbol),
+         LA_PRINT_TYPE (SYMBOL_TYPE (symbol), SYMBOL_PRINT_NAME (symbol),
                         outfile,
                         TYPE_CODE (SYMBOL_TYPE (symbol)) != TYPE_CODE_ENUM,
                         depth);
          fprintf_filtered (outfile, "; ");
        }
       else
-       fprintf_filtered (outfile, "%s ", SYMBOL_SOURCE_NAME (symbol));
+       fprintf_filtered (outfile, "%s ", SYMBOL_PRINT_NAME (symbol));
 
       switch (SYMBOL_CLASS (symbol))
        {
@@ -705,7 +736,7 @@ print_symbol (args)
 
        case LOC_BLOCK:
          fprintf_filtered (outfile, "block object ");
-         gdb_print_address (SYMBOL_BLOCK_VALUE (symbol), outfile);
+         gdb_print_host_address (SYMBOL_BLOCK_VALUE (symbol), outfile);
          fprintf_filtered (outfile, ", ");
          print_address_numeric (BLOCK_START (SYMBOL_BLOCK_VALUE (symbol)),
                                 1,
@@ -721,6 +752,11 @@ print_symbol (args)
                               SYMBOL_BFD_SECTION (symbol)));
          break;
 
+       case LOC_COMPUTED:
+       case LOC_COMPUTED_ARG:
+         fprintf_filtered (outfile, "computed at runtime");
+         break;
+
        case LOC_UNRESOLVED:
          fprintf_filtered (outfile, "unresolved");
          break;
@@ -740,12 +776,10 @@ print_symbol (args)
 }
 
 void
-maintenance_print_psymbols (args, from_tty)
-     char *args;
-     int from_tty;
+maintenance_print_psymbols (char *args, int from_tty)
 {
   char **argv;
-  GDB_FILE *outfile;
+  struct ui_file *outfile;
   struct cleanup *cleanups;
   char *symname = NULL;
   char *filename = DEV_TTY;
@@ -775,12 +809,12 @@ maintenance_print_psymbols (args, from_tty)
     }
 
   filename = tilde_expand (filename);
-  make_cleanup (free, filename);
+  make_cleanup (xfree, filename);
 
   outfile = gdb_fopen (filename, FOPEN_WT);
   if (outfile == 0)
     perror_with_name (filename);
-  make_cleanup ((make_cleanup_func) gdb_fclose, &outfile);
+  make_cleanup_ui_file_delete (outfile);
 
   immediate_quit++;
   ALL_PSYMTABS (objfile, ps)
@@ -791,16 +825,13 @@ maintenance_print_psymbols (args, from_tty)
 }
 
 static void
-print_partial_symbols (p, count, what, outfile)
-     struct partial_symbol **p;
-     int count;
-     char *what;
-     GDB_FILE *outfile;
+print_partial_symbols (struct partial_symbol **p, int count, char *what,
+                      struct ui_file *outfile)
 {
   fprintf_filtered (outfile, "  %s partial symbols:\n", what);
   while (count-- > 0)
     {
-      fprintf_filtered (outfile, "    `%s'", SYMBOL_NAME (*p));
+      fprintf_filtered (outfile, "    `%s'", DEPRECATED_SYMBOL_NAME (*p));
       if (SYMBOL_DEMANGLED_NAME (*p) != NULL)
        {
          fprintf_filtered (outfile, "  `%s'", SYMBOL_DEMANGLED_NAME (*p));
@@ -877,6 +908,10 @@ print_partial_symbols (p, count, what, outfile)
        case LOC_OPTIMIZED_OUT:
          fputs_filtered ("optimized out", outfile);
          break;
+       case LOC_COMPUTED:
+       case LOC_COMPUTED_ARG:
+         fputs_filtered ("computed at runtime", outfile);
+         break;
        default:
          fputs_filtered ("<invalid location>", outfile);
          break;
@@ -889,12 +924,10 @@ print_partial_symbols (p, count, what, outfile)
 }
 
 void
-maintenance_print_msymbols (args, from_tty)
-     char *args;
-     int from_tty;
+maintenance_print_msymbols (char *args, int from_tty)
 {
   char **argv;
-  GDB_FILE *outfile;
+  struct ui_file *outfile;
   struct cleanup *cleanups;
   char *filename = DEV_TTY;
   char *symname = NULL;
@@ -923,12 +956,12 @@ maintenance_print_msymbols (args, from_tty)
     }
 
   filename = tilde_expand (filename);
-  make_cleanup (free, filename);
+  make_cleanup (xfree, filename);
 
   outfile = gdb_fopen (filename, FOPEN_WT);
   if (outfile == 0)
     perror_with_name (filename);
-  make_cleanup ((make_cleanup_func) gdb_fclose, &outfile);
+  make_cleanup_ui_file_delete (outfile);
 
   immediate_quit++;
   ALL_OBJFILES (objfile)
@@ -940,9 +973,7 @@ maintenance_print_msymbols (args, from_tty)
 }
 
 void
-maintenance_print_objfiles (ignore, from_tty)
-     char *ignore;
-     int from_tty;
+maintenance_print_objfiles (char *ignore, int from_tty)
 {
   struct objfile *objfile;
 
@@ -957,9 +988,7 @@ maintenance_print_objfiles (ignore, from_tty)
 /* Check consistency of psymtabs and symtabs.  */
 
 void
-maintenance_check_symtabs (ignore, from_tty)
-     char *ignore;
-     int from_tty;
+maintenance_check_symtabs (char *ignore, int from_tty)
 {
   register struct symbol *sym;
   register struct partial_symbol **psym;
@@ -981,12 +1010,12 @@ maintenance_check_symtabs (ignore, from_tty)
     length = ps->n_static_syms;
     while (length--)
       {
-       sym = lookup_block_symbol (b, SYMBOL_NAME (*psym),
-                                  SYMBOL_NAMESPACE (*psym));
+       sym = lookup_block_symbol (b, DEPRECATED_SYMBOL_NAME (*psym),
+                                  NULL, SYMBOL_NAMESPACE (*psym));
        if (!sym)
          {
            printf_filtered ("Static symbol `");
-           puts_filtered (SYMBOL_NAME (*psym));
+           puts_filtered (DEPRECATED_SYMBOL_NAME (*psym));
            printf_filtered ("' only found in ");
            puts_filtered (ps->filename);
            printf_filtered (" psymtab\n");
@@ -998,12 +1027,12 @@ maintenance_check_symtabs (ignore, from_tty)
     length = ps->n_global_syms;
     while (length--)
       {
-       sym = lookup_block_symbol (b, SYMBOL_NAME (*psym),
-                                  SYMBOL_NAMESPACE (*psym));
+       sym = lookup_block_symbol (b, DEPRECATED_SYMBOL_NAME (*psym),
+                                  NULL, SYMBOL_NAMESPACE (*psym));
        if (!sym)
          {
            printf_filtered ("Global symbol `");
-           puts_filtered (SYMBOL_NAME (*psym));
+           puts_filtered (DEPRECATED_SYMBOL_NAME (*psym));
            printf_filtered ("' only found in ");
            puts_filtered (ps->filename);
            printf_filtered (" psymtab\n");
@@ -1044,8 +1073,7 @@ maintenance_check_symtabs (ignore, from_tty)
 /* Return the nexting depth of a block within other blocks in its symtab.  */
 
 static int
-block_depth (block)
-     struct block *block;
+block_depth (struct block *block)
 {
   register int i = 0;
   while ((block = BLOCK_SUPERBLOCK (block)) != NULL)
@@ -1061,9 +1089,8 @@ block_depth (block)
    be freed in free_objfile().  */
 
 void
-extend_psymbol_list (listp, objfile)
-     register struct psymbol_allocation_list *listp;
-     struct objfile *objfile;
+extend_psymbol_list (register struct psymbol_allocation_list *listp,
+                    struct objfile *objfile)
 {
   int new_size;
   if (listp->size == 0)
@@ -1088,7 +1115,7 @@ extend_psymbol_list (listp, objfile)
 
 /* Do early runtime initializations. */
 void
-_initialize_symmisc ()
+_initialize_symmisc (void)
 {
   std_in = stdin;
   std_out = stdout;
This page took 0.035648 seconds and 4 git commands to generate.