Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* RFA: remove METHODS_DOMAIN
@ 2008-09-19 21:07 Tom Tromey
  2008-10-01 16:57 ` Joel Brobecker
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2008-09-19 21:07 UTC (permalink / raw)
  To: gdb-patches

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;
 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: RFA: remove METHODS_DOMAIN
  2008-09-19 21:07 RFA: remove METHODS_DOMAIN Tom Tromey
@ 2008-10-01 16:57 ` Joel Brobecker
  2008-10-01 17:06   ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Joel Brobecker @ 2008-10-01 16:57 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

C++ maintainers,

> 	* symtab.c (search_symbols): Update.
> 	* symtab.h (domain_enum_tag) <METHODS_DOMAIN>: Remove.

Are we planning on using the METHODS_DOMAIN kind, ever? If not,
then I will review and possibly approve.

Apparently, this was introduced in June 1998, and was actually
used. I haven't done the archeology to see when it stopped being
used.  But it's not used anymore.

Thank you!

-- 
Joel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: RFA: remove METHODS_DOMAIN
  2008-10-01 16:57 ` Joel Brobecker
@ 2008-10-01 17:06   ` Daniel Jacobowitz
  2008-10-01 17:10     ` Joel Brobecker
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2008-10-01 17:06 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: Tom Tromey, gdb-patches

On Wed, Oct 01, 2008 at 09:56:36AM -0700, Joel Brobecker wrote:
> C++ maintainers,
> 
> > 	* symtab.c (search_symbols): Update.
> > 	* symtab.h (domain_enum_tag) <METHODS_DOMAIN>: Remove.
> 
> Are we planning on using the METHODS_DOMAIN kind, ever? If not,
> then I will review and possibly approve.

I don't think we want it.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: RFA: remove METHODS_DOMAIN
  2008-10-01 17:06   ` Daniel Jacobowitz
@ 2008-10-01 17:10     ` Joel Brobecker
  0 siblings, 0 replies; 4+ messages in thread
From: Joel Brobecker @ 2008-10-01 17:10 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches

> > > 	* symtab.c (search_symbols): Update.
> > > 	* symtab.h (domain_enum_tag) <METHODS_DOMAIN>: Remove.
> > 
> > Are we planning on using the METHODS_DOMAIN kind, ever? If not,
> > then I will review and possibly approve.
> 
> I don't think we want it.

Thank, Daniel.  The patch looks OK to me, so let's check it in, Tom.

-- 
Joel


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-10-01 17:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-19 21:07 RFA: remove METHODS_DOMAIN Tom Tromey
2008-10-01 16:57 ` Joel Brobecker
2008-10-01 17:06   ` Daniel Jacobowitz
2008-10-01 17:10     ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox