]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Convert lookup_symbol_in_objfile
authorTom Tromey <tom@tromey.com>
Thu, 2 Jan 2025 22:28:18 +0000 (15:28 -0700)
committerTom Tromey <tom@tromey.com>
Wed, 10 Sep 2025 22:07:57 +0000 (16:07 -0600)
This converts lookup_symbol_in_objfile to the callback approach by
removing the call to lookup_symbol_in_objfile_symtabs.  (The latter is
not removed as there are still other callers.)

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=16994
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=16998
Acked-By: Simon Marchi <simon.marchi@efficios.com>
gdb/symtab.c

index e039e43acc7154cc3bcd919ddd5bd2688123c0d4..25b6a84fa922c20180976d28138046ab3b5b26f4 100644 (file)
@@ -2586,24 +2586,12 @@ lookup_symbol_in_objfile (struct objfile *objfile, enum block_enum block_index,
                              ? "GLOBAL_BLOCK" : "STATIC_BLOCK",
                              name, domain_name (domain).c_str ());
 
-  result = lookup_symbol_in_objfile_symtabs (objfile, block_index,
-                                            name, domain);
-  if (result.symbol != NULL)
-    {
-      symbol_lookup_debug_printf
-       ("lookup_symbol_in_objfile (...) = %s (in symtabs)",
-        host_address_to_string (result.symbol));
-      return result;
-    }
-
   result = lookup_symbol_via_quick_fns (objfile, block_index,
                                        name, domain);
-  symbol_lookup_debug_printf ("lookup_symbol_in_objfile (...) = %s%s",
+  symbol_lookup_debug_printf ("lookup_symbol_in_objfile (...) = %s",
                              result.symbol != NULL
                              ? host_address_to_string (result.symbol)
-                             : "NULL",
-                             result.symbol != NULL ? " (via quick fns)"
-                             : "");
+                             : "NULL");
   return result;
 }