* exec.c (xfer_memory): Add attrib argument.
[deliverable/binutils-gdb.git] / gdb / symtab.c
index 09a8d79ec41d0f3b3cd73592bfae363505dd8963..832fb019a9016c97e5696cf5385b4ed92296dbd9 100644 (file)
@@ -35,6 +35,7 @@
 #include "language.h"
 #include "demangle.h"
 #include "inferior.h"
+#include "linespec.h"
 
 #include "obstack.h"
 
@@ -116,8 +117,6 @@ struct type *builtin_type_error;
 
 const struct block *block_found;
 
-char no_symtab_msg[] = "No symbol table is loaded.  Use the \"file\" command.";
-
 /* While the C++ support is still in flux, issue a possibly helpful hint on
    using the new command completion feature on single quoted demangled C++
    symbols.  Remove when loose ends are cleaned up.   FIXME -fnf */
@@ -596,7 +595,7 @@ lookup_symbol (const char *name, const struct block *block,
   returnval = lookup_symbol_aux (modified_name, block, namespace,
                                 is_a_field_of_this, symtab);
   if (needtofreename)
-    free (modified_name2);
+    xfree (modified_name2);
 
   return returnval;     
 }
@@ -772,8 +771,8 @@ lookup_symbol_aux (const char *name, const struct block *block,
            {
              /* This is a mangled variable, look it up by its
                 mangled name.  */
-             return lookup_symbol (SYMBOL_NAME (msymbol), block,
-                                   namespace, is_a_field_of_this, symtab);
+             return lookup_symbol_aux (SYMBOL_NAME (msymbol), block,
+                                       namespace, is_a_field_of_this, symtab);
            }
          /* There are no debug symbols for this file, or we are looking
             for an unmangled variable.
@@ -1005,7 +1004,7 @@ lookup_partial_symbol (struct partial_symtab *pst, const char *name, int global,
            {
              do_linear_search = 1;
            }
-         if (STRCMP (SYMBOL_SOURCE_NAME (*center), name) >= 0)
+         if (strcmp (SYMBOL_SOURCE_NAME (*center), name) >= 0)
            {
              top = center;
            }
@@ -1238,7 +1237,7 @@ lookup_block_symbol (register const struct block *block, const char *name,
            {
              top = inc;
            }
-         else if (STRCMP (SYMBOL_SOURCE_NAME (sym), name) < 0)
+         else if (strcmp (SYMBOL_SOURCE_NAME (sym), name) < 0)
            {
              bot = inc;
            }
@@ -2226,7 +2225,7 @@ sources_info (char *ignore, int from_tty)
 
   if (!have_full_symbols () && !have_partial_symbols ())
     {
-      error (no_symtab_msg);
+      error ("No symbol table is loaded.  Use the \"file\" command.");
     }
 
   printf_filtered ("Source files for which symbols have been read in:\n\n");
@@ -2279,7 +2278,7 @@ free_search_symbols (struct symbol_search *symbols)
   for (p = symbols; p != NULL; p = next)
     {
       next = p->next;
-      free (p);
+      xfree (p);
     }
 }
 
@@ -2638,7 +2637,7 @@ print_symbol_info (namespace_enum kind, struct symtab *s, struct symbol *sym,
       else
        {
          fputs_filtered (demangled_name, stream);
-         free (demangled_name);
+         xfree (demangled_name);
        }
 #endif
     }
@@ -2877,7 +2876,7 @@ completion_list_add_name (char *symname, char *sym_text, int sym_text_len,
          {
            if (STREQ (new, return_val[i]))
              {
-               free (new);
+               xfree (new);
                return;
              }
          }
@@ -3184,7 +3183,7 @@ overload_list_add_symbol (struct symbol *sym, char *oload_name)
   /* skip symbols that cannot match */
   if (strcmp (sym_name, oload_name) != 0)
     {
-      free (sym_name);
+      xfree (sym_name);
       return;
     }
 
@@ -3207,7 +3206,7 @@ overload_list_add_symbol (struct symbol *sym, char *oload_name)
   sym_return_val[sym_return_val_index++] = sym;
   sym_return_val[sym_return_val_index] = NULL;
 
-  free (sym_name);
+  xfree (sym_name);
 }
 
 /* Return a null-terminated list of pointers to function symbols that
@@ -3328,7 +3327,7 @@ make_symbol_overload_list (struct symbol *fsym)
       }
   }
 
-  free (oload_name);
+  xfree (oload_name);
 
   return (sym_return_val);
 }
This page took 0.025264 seconds and 4 git commands to generate.