Replace solib_global_lookup with gdbarch_iterate_over_objfiles_in_search_order
[deliverable/binutils-gdb.git] / gdb / symtab.c
index 4b528b4270aae146e76f54fe8a5fb305534eefc9..54c7ed9c7c784a91f9cd1e2d2afcd5115f3c54e5 100644 (file)
@@ -241,10 +241,10 @@ static unsigned int new_symbol_cache_size = DEFAULT_SYMBOL_CACHE_SIZE;
    the original value from here.  */
 static unsigned int symbol_cache_size = DEFAULT_SYMBOL_CACHE_SIZE;
 
-/* Non-zero if a file may be known by two different basenames.
+/* True if a file may be known by two different basenames.
    This is the uncommon case, and significantly slows down gdb.
    Default set to "off" to not slow down the common case.  */
-int basenames_may_differ = 0;
+bool basenames_may_differ = false;
 
 /* Allow the user to configure the debugger behavior with respect
    to multiple-choice menus when more than one symbol matches during
@@ -1033,20 +1033,17 @@ matching_obj_sections (struct obj_section *obj_first,
      have the same size, address, and name.  We can't compare section indexes,
      which would be more reliable, because some sections may have been
      stripped.  */
-  if (bfd_get_section_size (first) != bfd_get_section_size (second))
+  if (bfd_section_size (first) != bfd_section_size (second))
     return 0;
 
   /* In-memory addresses may start at a different offset, relativize them.  */
-  if (bfd_get_section_vma (first->owner, first)
-      - bfd_get_start_address (first->owner)
-      != bfd_get_section_vma (second->owner, second)
-        - bfd_get_start_address (second->owner))
+  if (bfd_section_vma (first) - bfd_get_start_address (first->owner)
+      != bfd_section_vma (second) - bfd_get_start_address (second->owner))
     return 0;
 
-  if (bfd_get_section_name (first->owner, first) == NULL
-      || bfd_get_section_name (second->owner, second) == NULL
-      || strcmp (bfd_get_section_name (first->owner, first),
-                bfd_get_section_name (second->owner, second)) != 0)
+  if (bfd_section_name (first) == NULL
+      || bfd_section_name (second) == NULL
+      || strcmp (bfd_section_name (first), bfd_section_name (second)) != 0)
     return 0;
 
   /* Otherwise check that they are in corresponding objfiles.  */
@@ -2637,11 +2634,7 @@ lookup_global_or_static_symbol (const char *name,
       return result;
     }
 
-  /* Call library-specific lookup procedure.  */
-  if (objfile != NULL)
-    result = solib_global_lookup (objfile, name, domain);
-
-  /* If that didn't work go a global search (of global blocks, heh).  */
+  /* Do a global search (of global blocks, heh).  */
   if (result.symbol == NULL)
     {
       memset (&lookup_data, 0, sizeof (lookup_data));
@@ -4131,10 +4124,10 @@ operator_chars (const char *p, const char **end)
 struct filename_partial_match_opts
 {
   /* Only match the directory name part.   */
-  int dirname = false;
+  bool dirname = false;
 
   /* Only match the basename part.  */
-  int basename = false;
+  bool basename = false;
 };
 
 /* Data structure to maintain printing state for output_source_filename.  */
@@ -4912,8 +4905,8 @@ symtab_symbol_info (bool quiet, bool exclude_minsyms,
 
 struct info_print_options
 {
-  int quiet = false;
-  int exclude_minsyms = false;
+  bool quiet = false;
+  bool exclude_minsyms = false;
   char *type_regexp = nullptr;
 
   ~info_print_options ()
@@ -5010,7 +5003,7 @@ info_functions_command (const char *args, int from_tty)
 
 struct info_types_options
 {
-  int quiet = false;
+  bool quiet = false;
 };
 
 /* The options used by the 'info types' command.  */
This page took 0.026766 seconds and 4 git commands to generate.