diff options
author | David Carlton <carlton@bactrian.org> | 2003-03-03 18:01:33 +0000 |
---|---|---|
committer | David Carlton <carlton@bactrian.org> | 2003-03-03 18:01:33 +0000 |
commit | 25120b0d7a5d5e498fa200d6d14d8ee2cf0cb493 (patch) | |
tree | 9b9a530b2ae421c267083cb7f95a39839e0831a2 /gdb | |
parent | 78a11fb4746474c9b518f784cbd9f0806fc0c1ea (diff) | |
download | gdb-25120b0d7a5d5e498fa200d6d14d8ee2cf0cb493.zip gdb-25120b0d7a5d5e498fa200d6d14d8ee2cf0cb493.tar.gz gdb-25120b0d7a5d5e498fa200d6d14d8ee2cf0cb493.tar.bz2 |
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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/symtab.c | 12 | ||||
-rw-r--r-- | gdb/symtab.h | 10 |
3 files changed, 14 insertions, 14 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 41c4988..b79b9d1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 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. (collect_methods): New. diff --git a/gdb/symtab.c b/gdb/symtab.c index f3f55e1..af07d77 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -2931,7 +2931,8 @@ search_symbols (char *regexp, namespace_enum kind, int nfiles, char *files[], /* 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) @@ -2968,7 +2969,8 @@ search_symbols (char *regexp, namespace_enum kind, int nfiles, char *files[], 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))) { @@ -3008,7 +3010,8 @@ search_symbols (char *regexp, namespace_enum kind, int nfiles, char *files[], { 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) @@ -3062,7 +3065,8 @@ search_symbols (char *regexp, namespace_enum kind, int nfiles, char *files[], 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 || diff --git a/gdb/symtab.h b/gdb/symtab.h index 227736d..9e515de 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -222,16 +222,6 @@ extern char *symbol_demangled_name (struct general_symbol_info *symbol); || (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. |