From: Tom Tromey <tromey@redhat.com>
To: gdb-patches@sourceware.org
Subject: RFA: remove METHODS_DOMAIN
Date: Fri, 19 Sep 2008 21:07:00 -0000 [thread overview]
Message-ID: <m38wtnalte.fsf@fleche.redhat.com> (raw)
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;
next reply other threads:[~2008-09-19 21:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-19 21:07 Tom Tromey [this message]
2008-10-01 16:57 ` Joel Brobecker
2008-10-01 17:06 ` Daniel Jacobowitz
2008-10-01 17:10 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m38wtnalte.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox