2003-02-20 David Carlton <carlton@math.stanford.edu>
authorDavid Carlton <carlton@bactrian.org>
Thu, 20 Feb 2003 22:07:38 +0000 (22:07 +0000)
committerDavid Carlton <carlton@bactrian.org>
Thu, 20 Feb 2003 22:07:38 +0000 (22:07 +0000)
* symtab.c (search_symbols): Revert the search_symbols part of my
2002-12-23 patch.  Add comment.

gdb/ChangeLog
gdb/symtab.c

index 4c6dfd24b2b9c43144daae60383fb6c5586ec20b..25f6123459c43a3ddc1990de8cedebc81c440614 100644 (file)
@@ -1,3 +1,8 @@
+2003-02-20  David Carlton  <carlton@math.stanford.edu>
+
+       * symtab.c (search_symbols): Revert the search_symbols part of my
+       2002-12-23 patch.  Add comment.
+
 2002-02-20  Daniel Jacobowitz  <drow@mvista.com>
 
        * coffread.c (coff_symfile_read): Clean up minimal symbols earlier.
index c3c6d7fe353a5e8a6da480d8b63471a782a4406a..9ee05e5e166e4b6f183b6e6ec43c1be7c849d832 100644 (file)
@@ -2956,31 +2956,18 @@ search_symbols (char *regexp, namespace_enum kind, int nfiles, char *files[],
              {
                if (0 == find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol)))
                  {
-                   if (kind == FUNCTIONS_NAMESPACE)
-                     {
-                       found_misc = 1;
-                     }
-                   else
-                     {
-                       struct symbol *sym;
-
-                       if (SYMBOL_DEMANGLED_NAME (msymbol) != NULL)
-                         sym
-                           = lookup_symbol_aux_minsyms (SYMBOL_DEMANGLED_NAME
-                                                        (msymbol),
-                                                        SYMBOL_NAME (msymbol),
-                                                        VAR_NAMESPACE,
-                                                        NULL, NULL);
-                       else
-                         sym
-                           = lookup_symbol_aux_minsyms (SYMBOL_NAME (msymbol),
-                                                        NULL,
-                                                        VAR_NAMESPACE,
-                                                        NULL, NULL);
-
-                       if (sym == NULL)
-                         found_misc = 1;
-                     }
+                   /* FIXME: carlton/2003-02-04: Given that the
+                      semantics of lookup_symbol keeps on changing
+                      slightly, it would be a nice idea if we had a
+                      function lookup_symbol_minsym that found the
+                      symbol associated to a given minimal symbol (if
+                      any).  */
+                   if (kind == FUNCTIONS_NAMESPACE
+                       || lookup_symbol (SYMBOL_NAME (msymbol),
+                                         (struct block *) NULL,
+                                         VAR_NAMESPACE,
+                                       0, (struct symtab **) NULL) == NULL)
+                     found_misc = 1;
                  }
              }
          }