Index: gdb/cp-namespace.c =================================================================== RCS file: /cvs/src/src/gdb/cp-namespace.c,v retrieving revision 1.54 diff -u -p -r1.54 cp-namespace.c --- gdb/cp-namespace.c 29 Jun 2011 22:05:15 -0000 1.54 +++ gdb/cp-namespace.c 20 Oct 2011 18:26:22 -0000 @@ -53,7 +53,8 @@ static struct type *cp_lookup_transparen 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) { @@ -96,7 +97,7 @@ cp_scan_for_anonymous_namespaces (const 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, NULL, - &SYMBOL_SYMTAB (symbol)->objfile->objfile_obstack); + &objfile->objfile_obstack); } /* The "+ 2" is for the "::". */ previous_component = next_component + 2; Index: gdb/cp-support.h =================================================================== RCS file: /cvs/src/src/gdb/cp-support.h,v retrieving revision 1.45 diff -u -p -r1.45 cp-support.h --- gdb/cp-support.h 18 Aug 2011 16:17:38 -0000 1.45 +++ gdb/cp-support.h 20 Oct 2011 18:26:22 -0000 @@ -197,7 +197,8 @@ extern void cp_set_block_scope (const st 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: gdb/dwarf2read.c =================================================================== RCS file: /cvs/src/src/gdb/dwarf2read.c,v retrieving revision 1.574 diff -u -p -r1.574 dwarf2read.c --- gdb/dwarf2read.c 17 Oct 2011 12:57:14 -0000 1.574 +++ gdb/dwarf2read.c 20 Oct 2011 18:26:23 -0000 @@ -11936,7 +11936,7 @@ new_symbol_full (struct die_info *die, s 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: gdb/stabsread.c =================================================================== RCS file: /cvs/src/src/gdb/stabsread.c,v retrieving revision 1.138 diff -u -p -r1.138 stabsread.c --- gdb/stabsread.c 18 May 2011 16:30:36 -0000 1.138 +++ gdb/stabsread.c 20 Oct 2011 18:26:23 -0000 @@ -729,7 +729,7 @@ define_symbol (CORE_ADDR valu, char *str 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++;