Revert "Search global symbols from the expression's block objfile first."
[deliverable/binutils-gdb.git] / gdb / findvar.c
index ed7903cfb0911a8492f22b0b5f40ad4926687f0f..9009e6f324be2ae80984546281c665aba35c3ef2 100644 (file)
@@ -562,15 +562,7 @@ default_read_var_value (struct symbol *var, struct frame_info *frame)
        struct minimal_symbol *msym;
        struct obj_section *obj_section;
 
-       /* First, try locating the associated minimal symbol within
-          the same objfile.  This prevents us from selecting another
-          symbol with the same name but located in a different objfile.  */
-       msym = lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (var), NULL,
-                                     SYMBOL_SYMTAB (var)->objfile);
-       /* If the lookup failed, try expanding the search to all
-          objfiles.  */
-       if (msym == NULL)
-         msym = lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (var), NULL, NULL);
+       msym = lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (var), NULL, NULL);
        if (msym == NULL)
          error (_("No global symbol \"%s\"."), SYMBOL_LINKAGE_NAME (var));
        if (overlay_debugging)
This page took 0.023586 seconds and 4 git commands to generate.