#include "language.h"
#include "demangle.h"
#include "inferior.h"
+#include "linespec.h"
#include "obstack.h"
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 */
returnval = lookup_symbol_aux (modified_name, block, namespace,
is_a_field_of_this, symtab);
if (needtofreename)
- free (modified_name2);
+ xfree (modified_name2);
return returnval;
}
{
/* 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.
{
do_linear_search = 1;
}
- if (STRCMP (SYMBOL_SOURCE_NAME (*center), name) >= 0)
+ if (strcmp (SYMBOL_SOURCE_NAME (*center), name) >= 0)
{
top = center;
}
{
top = inc;
}
- else if (STRCMP (SYMBOL_SOURCE_NAME (sym), name) < 0)
+ else if (strcmp (SYMBOL_SOURCE_NAME (sym), name) < 0)
{
bot = inc;
}
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");
for (p = symbols; p != NULL; p = next)
{
next = p->next;
- free (p);
+ xfree (p);
}
}
else
{
fputs_filtered (demangled_name, stream);
- free (demangled_name);
+ xfree (demangled_name);
}
#endif
}
{
if (STREQ (new, return_val[i]))
{
- free (new);
+ xfree (new);
return;
}
}
/* skip symbols that cannot match */
if (strcmp (sym_name, oload_name) != 0)
{
- free (sym_name);
+ xfree (sym_name);
return;
}
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
}
}
- free (oload_name);
+ xfree (oload_name);
return (sym_return_val);
}