#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. */
extern char *operator_chars (char *, char **);
-extern char *no_symtab_msg;
-
/* Prototypes for local functions */
static void cplusplus_hint (char *name);
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);
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;
}
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];
/* 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);
/* 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;
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';
}
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);
}
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++;
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 */