]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Commit patch from HEAD: http://sourceware.org/ml/gdb-patches/2011-10/msg00577.html
authorAleksandar Ristovski <aristovski@qnx.com>
Tue, 25 Oct 2011 18:32:25 +0000 (18:32 +0000)
committerAleksandar Ristovski <aristovski@qnx.com>
Tue, 25 Oct 2011 18:32:25 +0000 (18:32 +0000)
* cp-namespace.c (cp_scan_for_anonymous_namespaces): Changed function
arguments by adding OBJFILE.  Instead of getting objfile from
symbol's symtab, use new argument OBJFILE.
* cp-support.h (cp_scan_for_anonymous_namespaces): Changed function
arguments by adding OBJFILE.
* gdb/dwarf2read.c (new_symbol_full): Change call to
cp_scan_for_anonymous_namespaces to match new signature.
* gdb/stabsread.c (define_symbol): Change call to
cp_scan_for_anonymous_namespaces to match new signature.

gdb/ChangeLog
gdb/cp-namespace.c
gdb/cp-support.h
gdb/dwarf2read.c
gdb/stabsread.c

index 52d3c19e07ab0c5649e2f6c8bf35c07cb37e53ca..c204b941eb9e96c00ab0637f8f521ac2f74b2063 100644 (file)
@@ -1,3 +1,15 @@
+2011-10-20  Aleksandar Ristovski  <aristovski@qnx.com>
+
+       * cp-namespace.c (cp_scan_for_anonymous_namespaces): Changed function
+       arguments by adding OBJFILE.  Instead of getting objfile from
+       symbol's symtab, use new argument OBJFILE.
+       * cp-support.h (cp_scan_for_anonymous_namespaces): Changed function
+       arguments by adding OBJFILE.
+       * gdb/dwarf2read.c (new_symbol_full): Change call to
+       cp_scan_for_anonymous_namespaces to match new signature.
+       * gdb/stabsread.c (define_symbol): Change call to
+       cp_scan_for_anonymous_namespaces to match new signature.
+
 2011-09-04  Joel Brobecker  <brobecker@adacore.com>
 
        * version.in: Set version to 7.3.1.20110904-cvs.
index cc761c8cd1a106061341f8fe67cbbbc80869018c..df44419bccf77f4863b462b137e279d23a60af70 100644 (file)
@@ -71,7 +71,8 @@ static void maintenance_cplus_namespace (char *args, int from_tty);
    anonymous namespace; if so, add an appropriate using directive.  */
 
 void
-cp_scan_for_anonymous_namespaces (const struct symbol *symbol)
+cp_scan_for_anonymous_namespaces (const struct symbol *const symbol,
+                                 struct objfile *const objfile)
 {
   if (SYMBOL_DEMANGLED_NAME (symbol) != NULL)
     {
@@ -114,7 +115,7 @@ cp_scan_for_anonymous_namespaces (const struct symbol *symbol)
                 namespace given by the previous component if there is
                 one, or to the global namespace if there isn't.  */
              cp_add_using_directive (dest, src, NULL, NULL,
-                                     &SYMBOL_SYMTAB (symbol)->objfile->objfile_obstack);
+                                     &objfile->objfile_obstack);
            }
          /* The "+ 2" is for the "::".  */
          previous_component = next_component + 2;
index bb0ba398f090b22edd08eef0e3ff4aa8f4f8476d..173a25b7d330abc0039201cc62e8de1fbf34a899 100644 (file)
@@ -153,7 +153,8 @@ extern void cp_set_block_scope (const struct symbol *symbol,
                                const char *processing_current_prefix,
                                int processing_has_namespace_info);
 
-extern void cp_scan_for_anonymous_namespaces (const struct symbol *symbol);
+extern void cp_scan_for_anonymous_namespaces (const struct symbol *symbol,
+                                             struct objfile *objfile);
 
 extern struct symbol *cp_lookup_symbol_nonlocal (const char *name,
                                                 const struct block *block,
index 5bc9d0edc92b8b7ecdbc328086865dc1758bacce..ad8fecb7f6422f52584f35831e6e3a7c5ff03550 100644 (file)
@@ -11445,7 +11445,7 @@ new_symbol_full (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
         namespaces based on the demangled name.  */
       if (!processing_has_namespace_info
          && cu->language == language_cplus)
-       cp_scan_for_anonymous_namespaces (sym);
+       cp_scan_for_anonymous_namespaces (sym, objfile);
     }
   return (sym);
 }
index c7d8a6c4743dd18ce008aa8ae8f6bf3c5c0093c2..63ef49c3284d64d6891560a5495ad88aba9f4928 100644 (file)
@@ -729,7 +729,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
        SYMBOL_SET_NAMES (sym, string, p - string, 1, objfile);
 
       if (SYMBOL_LANGUAGE (sym) == language_cplus)
-       cp_scan_for_anonymous_namespaces (sym);
+       cp_scan_for_anonymous_namespaces (sym, objfile);
 
     }
   p++;