Support arch-dependent fill
[binutils-gdb.git] / gdb / symmisc.c
index 7f2d38aa1518ed212a5578d1a6562ec6b0e0dff4..daa0b43e19394e1674be191dcde0fcfd975e10d5 100644 (file)
@@ -1,8 +1,7 @@
 /* Do various things to symbol tables (other than lookup), for GDB.
 
-   Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
-   1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2007, 2008, 2009, 2010,
-   2011 Free Software Foundation, Inc.
+   Copyright (C) 1986-2000, 2002-2004, 2007-2012 Free Software
+   Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,6 +22,7 @@
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "bfd.h"
+#include "filenames.h"
 #include "symfile.h"
 #include "objfiles.h"
 #include "breakpoint.h"
@@ -78,46 +78,6 @@ struct print_symbol_args
 
 static int print_symbol (void *);
 \f
-/* Free all the storage associated with the struct symtab <- S.
-   Note that some symtabs have contents that all live inside one big block of
-   memory, and some share the contents of another symbol table and so you
-   should not free the contents on their behalf (except sometimes the
-   linetable, which maybe per symtab even when the rest is not).
-   It is s->free_code that says which alternative to use.  */
-
-void
-free_symtab (struct symtab *s)
-{
-  switch (s->free_code)
-    {
-    case free_nothing:
-      /* All the contents are part of a big block of memory (an obstack),
-         and some other symtab is in charge of freeing that block.
-         Therefore, do nothing.  */
-      break;
-
-    case free_linetable:
-      /* Everything will be freed either by our `free_func'
-         or by some other symtab, except for our linetable.
-         Free that now.  */
-      if (LINETABLE (s))
-       xfree (LINETABLE (s));
-      break;
-    }
-
-  /* If there is a single block of memory to free, free it.  */
-  if (s->free_func != NULL)
-    s->free_func (s);
-
-  /* Free source-related stuff */
-  if (s->line_charpos != NULL)
-    xfree (s->line_charpos);
-  if (s->fullname != NULL)
-    xfree (s->fullname);
-  if (s->debugformat != NULL)
-    xfree (s->debugformat);
-  xfree (s);
-}
 
 void
 print_symbol_bcache_statistics (void)
@@ -264,6 +224,9 @@ dump_msymbols (struct objfile *objfile, struct ui_file *outfile)
        case mst_text:
          ms_type = 'T';
          break;
+       case mst_text_gnu_ifunc:
+         ms_type = 'i';
+         break;
        case mst_solib_trampoline:
          ms_type = 'S';
          break;
@@ -352,7 +315,7 @@ dump_symtab_1 (struct objfile *objfile, struct symtab *symtab,
        }
     }
   /* Now print the block info, but only for primary symtabs since we will
-     print lots of duplicate info otherwise. */
+     print lots of duplicate info otherwise.  */
   if (symtab->primary)
     {
       fprintf_filtered (outfile, "\nBlockvector:\n\n");
@@ -458,7 +421,7 @@ maintenance_print_symbols (char *args, int from_tty)
   if (argv[0] != NULL)
     {
       filename = argv[0];
-      /* If a second arg is supplied, it is a source file name to match on */
+      /* If a second arg is supplied, it is a source file name to match on */
       if (argv[1] != NULL)
        {
          symname = argv[1];
@@ -475,7 +438,7 @@ maintenance_print_symbols (char *args, int from_tty)
 
   immediate_quit++;
   ALL_SYMTABS (objfile, s)
-    if (symname == NULL || strcmp (symname, s->filename) == 0)
+    if (symname == NULL || filename_cmp (symname, s->filename) == 0)
     dump_symtab (objfile, s, outfile);
   immediate_quit--;
   do_cleanups (cleanups);
@@ -678,7 +641,7 @@ maintenance_print_msymbols (char *args, int from_tty)
   if (argv[0] != NULL)
     {
       filename = argv[0];
-      /* If a second arg is supplied, it is a source file name to match on */
+      /* If a second arg is supplied, it is a source file name to match on */
       if (argv[1] != NULL)
        {
          symname = xfullpath (argv[1]);
@@ -800,7 +763,7 @@ block_depth (struct block *block)
 }
 \f
 
-/* Do early runtime initializations. */
+/* Do early runtime initializations.  */
 void
 _initialize_symmisc (void)
 {