* exec.c (xfer_memory): Add attrib argument.
[deliverable/binutils-gdb.git] / gdb / linespec.c
index 4d3af751df9d2e9cc0fab8b37d996dc785bb426a..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. */
@@ -162,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);
@@ -305,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;
     }
@@ -391,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];
@@ -573,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);
@@ -727,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;
@@ -766,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';
                  }
@@ -1097,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++;
This page took 0.024255 seconds and 4 git commands to generate.