This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RFA: remove METHODS_DOMAIN
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 19 Sep 2008 15:05:17 -0600
- Subject: RFA: remove METHODS_DOMAIN
- Reply-to: Tom Tromey <tromey at redhat dot com>
While reading code I noticed that METHODS_DOMAIN is not really used.
It is checked for by search_symbols, but never passed in.
This patch removes this constant.
Built & regtested on x86-64 (compile farm).
Please review.
Tom
:ADDPATCH symbols:
2008-09-18 Tom Tromey <tromey@redhat.com>
* symtab.c (search_symbols): Update.
* symtab.h (domain_enum_tag) <METHODS_DOMAIN>: Remove.
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 1a0dcba..df5cd0b 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -2987,7 +2987,6 @@ sort_search_symbols (struct symbol_search *prevtail, int nfound)
Only symbols of KIND are searched:
FUNCTIONS_DOMAIN - search all functions
TYPES_DOMAIN - search all type names
- METHODS_DOMAIN - search all methods NOT IMPLEMENTED
VARIABLES_DOMAIN - search all symbols, excluding functions, type names,
and constants (enums)
@@ -3128,8 +3127,7 @@ search_symbols (char *regexp, domain_enum kind, int nfiles, char *files[],
&& ((kind == VARIABLES_DOMAIN && SYMBOL_CLASS (*psym) != LOC_TYPEDEF
&& SYMBOL_CLASS (*psym) != LOC_BLOCK)
|| (kind == FUNCTIONS_DOMAIN && SYMBOL_CLASS (*psym) == LOC_BLOCK)
- || (kind == TYPES_DOMAIN && SYMBOL_CLASS (*psym) == LOC_TYPEDEF)
- || (kind == METHODS_DOMAIN && SYMBOL_CLASS (*psym) == LOC_BLOCK))))
+ || (kind == TYPES_DOMAIN && SYMBOL_CLASS (*psym) == LOC_TYPEDEF))))
{
PSYMTAB_TO_SYMTAB (ps);
keep_going = 0;
@@ -3204,8 +3202,7 @@ search_symbols (char *regexp, domain_enum kind, int nfiles, char *files[],
&& SYMBOL_CLASS (sym) != LOC_BLOCK
&& SYMBOL_CLASS (sym) != LOC_CONST)
|| (kind == FUNCTIONS_DOMAIN && SYMBOL_CLASS (sym) == LOC_BLOCK)
- || (kind == TYPES_DOMAIN && SYMBOL_CLASS (sym) == LOC_TYPEDEF)
- || (kind == METHODS_DOMAIN && SYMBOL_CLASS (sym) == LOC_BLOCK))))
+ || (kind == TYPES_DOMAIN && SYMBOL_CLASS (sym) == LOC_TYPEDEF))))
{
/* match */
psr = (struct symbol_search *) xmalloc (sizeof (struct symbol_search));
diff --git a/gdb/symtab.h b/gdb/symtab.h
index c124242..c312f4d 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -396,18 +396,15 @@ typedef enum domain_enum_tag
/* Searching domains. These overlap with VAR_DOMAIN, providing
some granularity with the search_symbols function. */
- /* Everything in VAR_DOMAIN minus FUNCTIONS_-, TYPES_-, and
- METHODS_DOMAIN */
+ /* Everything in VAR_DOMAIN minus FUNCTIONS_DOMAIN and
+ TYPES_DOMAIN. */
VARIABLES_DOMAIN,
/* All functions -- for some reason not methods, though. */
FUNCTIONS_DOMAIN,
/* All defined types */
- TYPES_DOMAIN,
-
- /* All class methods -- why is this separated out? */
- METHODS_DOMAIN
+ TYPES_DOMAIN
}
domain_enum;