From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27652 invoked by alias); 15 May 2003 18:22:11 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 27507 invoked from network); 15 May 2003 18:22:06 -0000 Received: from unknown (HELO localhost.redhat.com) (24.157.166.107) by sources.redhat.com with SMTP; 15 May 2003 18:22:06 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 163C92B2F for ; Thu, 15 May 2003 14:22:02 -0400 (EDT) Message-ID: <3EC3DAC9.3080302@redhat.com> Date: Thu, 15 May 2003 18:22:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [rfa] Inline/eliminate DEPRECATED_SYMBOL_MATCHES_NAME Content-Type: multipart/mixed; boundary="------------010605080900090205000704" X-SW-Source: 2003-05/txt/msg00247.txt.bz2 This is a multi-part message in MIME format. --------------010605080900090205000704 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 173 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 --------------010605080900090205000704 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 2274 2003-05-15 Andrew Cagney * 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 --------------010605080900090205000704--