2003-05-15 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Thu, 15 May 2003 22:23:24 +0000 (22:23 +0000)
committerAndrew Cagney <cagney@redhat.com>
Thu, 15 May 2003 22:23:24 +0000 (22:23 +0000)
* symtab.h (DEPRECATED_SYMBOL_MATCHES_NAME): Delete macro.
* minsyms.c (lookup_minimal_symbol): Inline
DEPRECATED_SYMBOL_MATCHES_NAME.  Replace STREQ with strcmp.

gdb/ChangeLog
gdb/minsyms.c
gdb/symtab.h

index 5e4706f57fcfd7b7baa0f22837ec12f01d9162a8..5802390fc238014552c51e19bfd75efaf3c20ebf 100644 (file)
@@ -1,5 +1,9 @@
 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.
+
        * c-lang.c (c_printstr): Delete "extern inspect_it" declaration.
        * p-valprint.c (pascal_object_print_value_fields): Ditto.
        * p-lang.c (pascal_printstr): Ditto.
index 1f6cb3888006814cca6188235c4d3a547baad8ee..fa7209d2bc633d9756a62ca0753a365461668c19 100644 (file)
@@ -189,7 +189,15 @@ lookup_minimal_symbol (register const char *name, const char *sfile,
 
             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 000ae0edfa35d5a0d0f0c6de10392fc9258539b9..f8be03b75ab2dfd6ba88b3eeff830cbbf714a32e 100644 (file)
@@ -219,16 +219,6 @@ extern char *symbol_demangled_name (struct general_symbol_info *symbol);
    "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