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-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-10-20 Phil Muldoon <pmuldoon@redhat.com>
PR python/13308
2011-10-20 Phil Muldoon <pmuldoon@redhat.com>
PR python/13308
anonymous namespace; if so, add an appropriate using directive. */
void
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)
{
{
if (SYMBOL_DEMANGLED_NAME (symbol) != NULL)
{
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,
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;
}
/* The "+ 2" is for the "::". */
previous_component = next_component + 2;
const char *processing_current_prefix,
int processing_has_namespace_info);
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,
extern struct symbol *cp_lookup_symbol_nonlocal (const char *name,
const struct block *block,
namespaces based on the demangled name. */
if (!processing_has_namespace_info
&& cu->language == language_cplus)
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);
SYMBOL_SET_NAMES (sym, string, p - string, 1, objfile);
if (SYMBOL_LANGUAGE (sym) == language_cplus)
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);