* exec.c (xfer_memory): Add attrib argument.
[deliverable/binutils-gdb.git] / gdb / linespec.c
index ac6b65eb9cf092d3a9b9837525e792bc96334ec6..ae0b51a381d63bbe22b1e05e74e99441dacd5d2c 100644 (file)
 
 #include "defs.h"
 #include "symtab.h"
-#include "gdbtypes.h"
+#include "frame.h"
+#include "command.h"
 #include "symfile.h"
 #include "objfiles.h"
-#include "gdbcmd.h"
 #include "demangle.h"
-#include "inferior.h"
+#include "value.h"
+#include "completer.h"
 
 /* Prototype for one function in parser-defs.h,
    instead of including that entire file. */
@@ -37,8 +38,6 @@ extern char *find_template_name_end (char *);
 
 extern char *operator_chars (char *, char **);
 
-extern char *no_symtab_msg;
-
 /* Prototypes for local functions */
 
 static void cplusplus_hint (char *name);
@@ -164,7 +163,7 @@ find_methods (struct type *t, char *name, struct symbol **sym_arr)
                                                field_counter);
                    phys_name = alloca (strlen (tmp_name) + 1);
                    strcpy (phys_name, tmp_name);
-                   free (tmp_name);
+                   xfree (tmp_name);
                  }
                else
                  phys_name = TYPE_FN_FIELD_PHYSNAME (f, field_counter);
@@ -307,12 +306,12 @@ decode_line_2 (struct symbol *sym_arr[], int nelts, int funfirstline,
     alloca (nelts * sizeof (struct symtab_and_line));
   return_values.sals = (struct symtab_and_line *)
     xmalloc (nelts * sizeof (struct symtab_and_line));
-  old_chain = make_cleanup (free, return_values.sals);
+  old_chain = make_cleanup (xfree, return_values.sals);
 
   if (canonical)
     {
       canonical_arr = (char **) xmalloc (nelts * sizeof (char *));
-      make_cleanup (free, canonical_arr);
+      make_cleanup (xfree, canonical_arr);
       memset (canonical_arr, 0, nelts * sizeof (char *));
       *canonical = canonical_arr;
     }
@@ -393,7 +392,7 @@ decode_line_2 (struct symbol *sym_arr[], int nelts, int funfirstline,
              if (canonical_arr)
                {
                  symname = SYMBOL_NAME (sym_arr[num]);
-                 make_cleanup (free, symname);
+                 make_cleanup (xfree, symname);
                  canonical_arr[i] = savestring (symname, strlen (symname));
                }
              return_values.sals[i++] = values.sals[num];
@@ -575,7 +574,8 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab,
   /* Maybe arg is FILE : LINENUM or FILE : FUNCTION */
 
   is_quoted = (**argptr
-              && strchr (gdb_completer_quote_characters, **argptr) != NULL);
+              && strchr (get_gdb_completer_quote_characters (),
+                         **argptr) != NULL);
 
   has_parens = ((pp = strchr (*argptr, '(')) != NULL
                && (pp = strrchr (pp, ')')) != NULL);
@@ -729,7 +729,8 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab,
                  /* Arg token is not digits => try it as a function name
                     Find the next token(everything up to end or next blank). */
                  if (**argptr
-                     && strchr (gdb_completer_quote_characters, **argptr) != NULL)
+                     && strchr (get_gdb_completer_quote_characters (),
+                                **argptr) != NULL)
                    {
                      p = skip_quoted (*argptr);
                      *argptr = *argptr + 1;
@@ -768,7 +769,7 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab,
                    copy[p - *argptr] = '\0';
                    if (p != *argptr
                        && copy[p - *argptr - 1]
-                       && strchr (gdb_completer_quote_characters,
+                       && strchr (get_gdb_completer_quote_characters (),
                                   copy[p - *argptr - 1]) != NULL)
                      copy[p - *argptr - 1] = '\0';
                  }
@@ -939,7 +940,7 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab,
       if (s == 0)
        {
          if (!have_full_symbols () && !have_partial_symbols ())
-           error (no_symtab_msg);
+           error ("No symbol table is loaded.  Use the \"file\" command.");
          error ("No source file named %s.", copy);
        }
 
@@ -1099,7 +1100,7 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab,
   if (p != *argptr
       && copy[0]
       && copy[0] == copy[p - *argptr - 1]
-      && strchr (gdb_completer_quote_characters, copy[0]) != NULL)
+      && strchr (get_gdb_completer_quote_characters (), copy[0]) != NULL)
     {
       copy[p - *argptr - 1] = '\0';
       copy++;
@@ -1259,7 +1260,7 @@ minimal_symbol_found:             /* We also jump here from the case for variables
 
   if (!have_full_symbols () &&
       !have_partial_symbols () && !have_minimal_symbols ())
-    error (no_symtab_msg);
+    error ("No symbol table is loaded.  Use the \"file\" command.");
 
   error ("Function \"%s\" not defined.", copy);
   return values;               /* for lint */
This page took 0.025093 seconds and 4 git commands to generate.