Remove VAR_DOMAIN/STRUCT_DOMAIN ambiguity from ada-tasks.c.
[deliverable/binutils-gdb.git] / gdb / findvar.c
index ec6afd61e343956b19ee5d1454212c444d21fa79..a2a7bb7d6d6becdf4525a399151cd26e5dc3188e 100644 (file)
@@ -1,6 +1,6 @@
 /* Find a variable's value in memory, for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2013 Free Software Foundation, Inc.
+   Copyright (C) 1986-2014 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -390,10 +390,7 @@ struct minsym_lookup_data
   /* The field where the callback should store the minimal symbol
      if found.  It should be initialized to NULL before the search
      is started.  */
-  struct minimal_symbol *result;
-
-  /* The objfile in which the symbol was found.  */
-  struct objfile *objfile;
+  struct bound_minimal_symbol result;
 };
 
 /* A callback function for gdbarch_iterate_over_objfiles_in_search_order.
@@ -406,13 +403,12 @@ minsym_lookup_iterator_cb (struct objfile *objfile, void *cb_data)
 {
   struct minsym_lookup_data *data = (struct minsym_lookup_data *) cb_data;
 
-  gdb_assert (data->result == NULL);
+  gdb_assert (data->result.minsym == NULL);
 
   data->result = lookup_minimal_symbol (data->name, NULL, objfile);
-  data->objfile = objfile;
 
   /* The iterator should stop iff a match was found.  */
-  return (data->result != NULL);
+  return (data->result.minsym != NULL);
 }
 
 /* A default implementation for the "la_read_var_value" hook in
@@ -572,18 +568,18 @@ default_read_var_value (struct symbol *var, struct frame_info *frame)
          (get_objfile_arch (SYMBOL_SYMTAB (var)->objfile),
           minsym_lookup_iterator_cb, &lookup_data,
           SYMBOL_SYMTAB (var)->objfile);
-       msym = lookup_data.result;
+       msym = lookup_data.result.minsym;
 
        if (msym == NULL)
          error (_("No global symbol \"%s\"."), SYMBOL_LINKAGE_NAME (var));
        if (overlay_debugging)
-         addr = symbol_overlayed_address (SYMBOL_VALUE_ADDRESS (msym),
-                                          SYMBOL_OBJ_SECTION (lookup_data.objfile,
-                                                              msym));
+         addr = symbol_overlayed_address (BMSYMBOL_VALUE_ADDRESS (lookup_data.result),
+                                          MSYMBOL_OBJ_SECTION (lookup_data.result.objfile,
+                                                               msym));
        else
-         addr = SYMBOL_VALUE_ADDRESS (msym);
+         addr = BMSYMBOL_VALUE_ADDRESS (lookup_data.result);
 
-       obj_section = SYMBOL_OBJ_SECTION (lookup_data.objfile, msym);
+       obj_section = MSYMBOL_OBJ_SECTION (lookup_data.result.objfile, msym);
        if (obj_section
            && (obj_section->the_bfd_section->flags & SEC_THREAD_LOCAL) != 0)
          addr = target_translate_tls_address (obj_section->objfile, addr);
This page took 0.025435 seconds and 4 git commands to generate.