Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [rfa] Inline/eliminate DEPRECATED_SYMBOL_MATCHES_NAME
@ 2003-05-15 18:22 Andrew Cagney
  2003-05-15 19:47 ` David Carlton
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cagney @ 2003-05-15 18:22 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 173 bytes --]

This patch replaces the only remaining reference to 
DEPRECATED_SYMBOL_MATCHES_NAME with it's contents (which also contains a 
reference to a deprecated macro).

ok?
Andrew

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 2274 bytes --]

2003-05-15  Andrew Cagney  <cagney@redhat.com>

	* symtab.h (DEPRECATED_SYMBOL_MATCHES_NAME): Delete macro.
	* minsyms.c (lookup_minimal_symbol): Inline
	DEPRECATED_SYMBOL_MATCHES_NAME.  Replace STREQ with strcmp.

Index: minsyms.c
===================================================================
RCS file: /cvs/src/src/gdb/minsyms.c,v
retrieving revision 1.30
diff -u -r1.30 minsyms.c
--- minsyms.c	13 Apr 2003 15:25:23 -0000	1.30
+++ minsyms.c	15 May 2003 18:16:03 -0000
@@ -189,7 +189,15 @@
 
             while (msymbol != NULL && found_symbol == NULL)
 		{
-                if (DEPRECATED_SYMBOL_MATCHES_NAME (msymbol, name))
+		  /* FIXME: carlton/2003-02-27: This is an unholy
+		     mixture of linkage names and natural names.  If
+		     you want to test the linkage names with strcmp,
+		     do that.  If you want to test the natural names
+		     with strcmp_iw, use SYMBOL_MATCHES_NATURAL_NAME.  */
+		  if (strcmp (DEPRECATED_SYMBOL_NAME (msymbol), (name)) == 0
+		      || (SYMBOL_DEMANGLED_NAME (msymbol) != NULL
+			  && strcmp_iw (SYMBOL_DEMANGLED_NAME (msymbol),
+					(name)) == 0))
 		    {
                     switch (MSYMBOL_TYPE (msymbol))
                       {
Index: symtab.h
===================================================================
RCS file: /cvs/src/src/gdb/symtab.h,v
retrieving revision 1.70
diff -u -r1.70 symtab.h
--- symtab.h	14 May 2003 17:43:20 -0000	1.70
+++ symtab.h	15 May 2003 18:16:04 -0000
@@ -219,16 +219,6 @@
    "foo :: bar (int, long)".
    Evaluates to zero if the match fails, or nonzero if it succeeds. */
 
-/* FIXME: carlton/2003-02-27: This is an unholy mixture of linkage
-   names and natural names.  If you want to test the linkage names
-   with strcmp, do that.  If you want to test the natural names with
-   strcmp_iw, use SYMBOL_MATCHES_NATURAL_NAME.  */
-
-#define DEPRECATED_SYMBOL_MATCHES_NAME(symbol, name)			\
-  (STREQ (DEPRECATED_SYMBOL_NAME (symbol), (name))			\
-   || (SYMBOL_DEMANGLED_NAME (symbol) != NULL				\
-       && strcmp_iw (SYMBOL_DEMANGLED_NAME (symbol), (name)) == 0))
-
 /* Macro that tests a symbol for a match against a specified name
    string.  It tests against SYMBOL_NATURAL_NAME, and it ignores
    whitespace and trailing parentheses.  (See strcmp_iw for details

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

* Re: [rfa] Inline/eliminate DEPRECATED_SYMBOL_MATCHES_NAME
  2003-05-15 18:22 [rfa] Inline/eliminate DEPRECATED_SYMBOL_MATCHES_NAME Andrew Cagney
@ 2003-05-15 19:47 ` David Carlton
  2003-05-15 20:21   ` Elena Zannoni
  0 siblings, 1 reply; 4+ messages in thread
From: David Carlton @ 2003-05-15 19:47 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches

On Thu, 15 May 2003 14:22:01 -0400, Andrew Cagney <ac131313@redhat.com> said:

> This patch replaces the only remaining reference to
> DEPRECATED_SYMBOL_MATCHES_NAME with it's contents (which also contains
> a reference to a deprecated macro).

I can't approve it, but it's fine with me - I would actually even say
that it qualifies as obvious if Elena or Jim doesn't say otherwise in
the next few days.  The only reason why I hadn't done this earlier is
that lookup_minimal_symbol could potentially use some other cleanups,
which this would naturally be part of, but given that I haven't gotten
around to posting an RF{A,C} for that, deleting the macro now makes
sense.

David Carlton
carlton@math.stanford.edu


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

* Re: [rfa] Inline/eliminate DEPRECATED_SYMBOL_MATCHES_NAME
  2003-05-15 19:47 ` David Carlton
@ 2003-05-15 20:21   ` Elena Zannoni
  2003-05-15 22:25     ` Andrew Cagney
  0 siblings, 1 reply; 4+ messages in thread
From: Elena Zannoni @ 2003-05-15 20:21 UTC (permalink / raw)
  To: David Carlton; +Cc: Andrew Cagney, gdb-patches

David Carlton writes:
 > On Thu, 15 May 2003 14:22:01 -0400, Andrew Cagney <ac131313@redhat.com> said:
 > 
 > > This patch replaces the only remaining reference to
 > > DEPRECATED_SYMBOL_MATCHES_NAME with it's contents (which also contains
 > > a reference to a deprecated macro).
 > 
 > I can't approve it, but it's fine with me - I would actually even say
 > that it qualifies as obvious if Elena or Jim doesn't say otherwise in
 > the next few days.  The only reason why I hadn't done this earlier is
 > that lookup_minimal_symbol could potentially use some other cleanups,
 > which this would naturally be part of, but given that I haven't gotten
 > around to posting an RF{A,C} for that, deleting the macro now makes
 > sense.
 > 
 > David Carlton
 > carlton@math.stanford.edu

yes, fine with me.

thanks
elena


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

* Re: [rfa] Inline/eliminate DEPRECATED_SYMBOL_MATCHES_NAME
  2003-05-15 20:21   ` Elena Zannoni
@ 2003-05-15 22:25     ` Andrew Cagney
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2003-05-15 22:25 UTC (permalink / raw)
  To: Elena Zannoni; +Cc: David Carlton, gdb-patches

> David Carlton writes:
>  > On Thu, 15 May 2003 14:22:01 -0400, Andrew Cagney <ac131313@redhat.com> said:
>  > 
>  > > This patch replaces the only remaining reference to
>  > > DEPRECATED_SYMBOL_MATCHES_NAME with it's contents (which also contains
>  > > a reference to a deprecated macro).
>  > 
>  > I can't approve it, but it's fine with me - I would actually even say
>  > that it qualifies as obvious if Elena or Jim doesn't say otherwise in
>  > the next few days.  The only reason why I hadn't done this earlier is
>  > that lookup_minimal_symbol could potentially use some other cleanups,
>  > which this would naturally be part of, but given that I haven't gotten
>  > around to posting an RF{A,C} for that, deleting the macro now makes
>  > sense.

Ah, that's why I asked - I wondered if someone had other plans for it :-)

>  > David Carlton
>  > carlton@math.stanford.edu
> 
> yes, fine with me.

ta, committed.

Andrew



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

end of thread, other threads:[~2003-05-15 22:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-15 18:22 [rfa] Inline/eliminate DEPRECATED_SYMBOL_MATCHES_NAME Andrew Cagney
2003-05-15 19:47 ` David Carlton
2003-05-15 20:21   ` Elena Zannoni
2003-05-15 22:25     ` Andrew Cagney

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