+2003-03-03 David Carlton <carlton@math.stanford.edu>
+
+ * symtab.h (SYMBOL_MATCHES_REGEXP): Delete.
+ * symtab.c (search_symbols): Replace uses of SYMBOL_MATCHES_REGEXP
+ by regexp matching against SYMBOL_NATURAL_NAME.
+
2003-03-03 David Carlton <carlton@math.stanford.edu>
* linespec.c (find_method): Extract code into collect_methods.
/* If it would match (logic taken from loop below)
load the file and go on to the next one */
if (file_matches (ps->filename, files, nfiles)
- && ((regexp == NULL || SYMBOL_MATCHES_REGEXP (*psym))
+ && ((regexp == NULL
+ || re_exec (SYMBOL_NATURAL_NAME (*psym)) != 0)
&& ((kind == VARIABLES_NAMESPACE && SYMBOL_CLASS (*psym) != LOC_TYPEDEF
&& SYMBOL_CLASS (*psym) != LOC_BLOCK)
|| (kind == FUNCTIONS_NAMESPACE && SYMBOL_CLASS (*psym) == LOC_BLOCK)
MSYMBOL_TYPE (msymbol) == ourtype3 ||
MSYMBOL_TYPE (msymbol) == ourtype4)
{
- if (regexp == NULL || SYMBOL_MATCHES_REGEXP (msymbol))
+ if (regexp == NULL
+ || re_exec (SYMBOL_NATURAL_NAME (msymbol)) != 0)
{
if (0 == find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol)))
{
{
QUIT;
if (file_matches (s->filename, files, nfiles)
- && ((regexp == NULL || SYMBOL_MATCHES_REGEXP (sym))
+ && ((regexp == NULL
+ || re_exec (SYMBOL_NATURAL_NAME (sym)) != 0)
&& ((kind == VARIABLES_NAMESPACE && SYMBOL_CLASS (sym) != LOC_TYPEDEF
&& SYMBOL_CLASS (sym) != LOC_BLOCK
&& SYMBOL_CLASS (sym) != LOC_CONST)
MSYMBOL_TYPE (msymbol) == ourtype3 ||
MSYMBOL_TYPE (msymbol) == ourtype4)
{
- if (regexp == NULL || SYMBOL_MATCHES_REGEXP (msymbol))
+ if (regexp == NULL
+ || re_exec (SYMBOL_NATURAL_NAME (msymbol)) != 0)
{
/* Functions: Look up by address. */
if (kind != FUNCTIONS_NAMESPACE ||
|| (SYMBOL_DEMANGLED_NAME (symbol) != NULL \
&& strcmp_iw (SYMBOL_DEMANGLED_NAME (symbol), (name)) == 0))
-/* Macro that tests a symbol for an re-match against the last compiled regular
- expression. First test the unencoded name, then look for and test a C++
- encoded name if it exists.
- Evaluates to zero if the match fails, or nonzero if it succeeds. */
-
-#define SYMBOL_MATCHES_REGEXP(symbol) \
- (re_exec (DEPRECATED_SYMBOL_NAME (symbol)) != 0 \
- || (SYMBOL_DEMANGLED_NAME (symbol) != NULL \
- && re_exec (SYMBOL_DEMANGLED_NAME (symbol)) != 0))
-
/* Define a simple structure used to hold some very basic information about
all defined global symbols (text, data, bss, abs, etc). The only required
information is the general_symbol_info.