Change symbol_set_names to take an objfile_per_bfd_storage
authorTom Tromey <tom@tromey.com>
Thu, 10 May 2018 22:23:49 +0000 (16:23 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 10 Jan 2019 14:08:12 +0000 (07:08 -0700)
This changes symbol_set_names to take an objfile_per_bfd_storage
argument, and updates the users.  It also changes PSYMBOL_SET_NAMES to
take this argument directly; I feel this clarifies the storage
location of objects created in psymtab.c.

gdb/ChangeLog
2019-01-10  Tom Tromey  <tom@tromey.com>

* symtab.h (SYMBOL_SET_NAMES): Update.
(symbol_set_names): Update.
(MSYMBOL_SET_NAMES): Update.
* symtab.c (symbol_set_names): Change argument to be an
objfile_per_bfd_storage.
* psymtab.c (add_psymbol_to_bcache): Update.
* psympriv.h (PSYMBOL_SET_NAMES): Take per_bfd argument.

gdb/ChangeLog
gdb/psymtab.c
gdb/symtab.c
gdb/symtab.h

index 25a219f64d752c00d5fd56cef5a82b756db9fea3..63a8120a29dca93fa2501d9ccaed892801573a1b 100644 (file)
@@ -1,3 +1,13 @@
+2019-01-10  Tom Tromey  <tom@tromey.com>
+
+       * symtab.h (SYMBOL_SET_NAMES): Update.
+       (symbol_set_names): Update.
+       (MSYMBOL_SET_NAMES): Update.
+       * symtab.c (symbol_set_names): Change argument to be an
+       objfile_per_bfd_storage.
+       * psymtab.c (add_psymbol_to_bcache): Update.
+       * psympriv.h (PSYMBOL_SET_NAMES): Take per_bfd argument.
+
 2019-01-10  Tom Tromey  <tom@tromey.com>
 
        * symtab.c (create_demangled_names_hash): Change argument to be an
index 356901f14b75189993c36e456084e76e20641482..418530dd9a910f5167ecbdf470035967a4be6226 100644 (file)
@@ -1610,7 +1610,7 @@ add_psymbol_to_bcache (const char *name, int namelength, int copy_name,
   memset (&psymbol.language_specific, 0, sizeof (psymbol.language_specific));
   psymbol.ada_mangled = 0;
   symbol_set_language (&psymbol, language, &objfile->objfile_obstack);
-  symbol_set_names (&psymbol, name, namelength, copy_name, objfile);
+  symbol_set_names (&psymbol, name, namelength, copy_name, objfile->per_bfd);
 
   /* Stash the partial symbol away in the cache.  */
   return psymbol_bcache_full (&psymbol, objfile->psymbol_cache, added);
index 3f15dbdf2516d133904577b3a95d682ded663030..d5e18a64d06c12d1153d2b8cb5fbb8ea4470a802 100644 (file)
@@ -772,13 +772,12 @@ symbol_find_demangled_name (struct general_symbol_info *gsymbol,
 void
 symbol_set_names (struct general_symbol_info *gsymbol,
                  const char *linkage_name, int len, int copy_name,
-                 struct objfile *objfile)
+                 struct objfile_per_bfd_storage *per_bfd)
 {
   struct demangled_name_entry **slot;
   /* A 0-terminated copy of the linkage name.  */
   const char *linkage_name_copy;
   struct demangled_name_entry entry;
-  struct objfile_per_bfd_storage *per_bfd = objfile->per_bfd;
 
   if (gsymbol->language == language_ada)
     {
index 7d97372de6b0613fa85c8834cf821f06461ccb45..57ed2c0948e464d0f17acb07add7f5384e931fed 100644 (file)
@@ -494,10 +494,11 @@ extern void symbol_set_language (struct general_symbol_info *symbol,
 /* Set the linkage and natural names of a symbol, by demangling
    the linkage name.  */
 #define SYMBOL_SET_NAMES(symbol,linkage_name,len,copy_name,objfile)    \
-  symbol_set_names (&(symbol)->ginfo, linkage_name, len, copy_name, objfile)
+  symbol_set_names (&(symbol)->ginfo, linkage_name, len, copy_name, \
+                   (objfile)->per_bfd)
 extern void symbol_set_names (struct general_symbol_info *symbol,
                              const char *linkage_name, int len, int copy_name,
-                             struct objfile *objfile);
+                             struct objfile_per_bfd_storage *per_bfd);
 
 /* Now come lots of name accessor macros.  Short version as to when to
    use which: Use SYMBOL_NATURAL_NAME to refer to the name of the
@@ -734,7 +735,8 @@ struct minimal_symbol
 #define MSYMBOL_SEARCH_NAME(symbol)                                     \
    (symbol_search_name (&(symbol)->mginfo))
 #define MSYMBOL_SET_NAMES(symbol,linkage_name,len,copy_name,objfile)   \
-  symbol_set_names (&(symbol)->mginfo, linkage_name, len, copy_name, objfile)
+  symbol_set_names (&(symbol)->mginfo, linkage_name, len, copy_name, \
+                   (objfile)->per_bfd)
 
 #include "minsyms.h"
 
This page took 0.067372 seconds and 4 git commands to generate.