Fixed stabs cplus_specific issue

2010-08-09  Sami Wagiaalla  <swagiaal@redhat.com>

	* symtab.c (symbol_get_demangled_name): Remove assertion and
	return NULL when language_specific.cplus_specific is not initialized.
	* stabsread.c (define_symbol): Set the name before calling
	cp_scan_for_anonymous_namespaces.
This commit is contained in:
Sami Wagiaalla
2010-08-09 20:13:51 +00:00
parent 776167e8fa
commit 45c58896fc
3 changed files with 15 additions and 3 deletions

View File

@@ -382,8 +382,10 @@ symbol_get_demangled_name (const struct general_symbol_info *gsymbol)
{
if (gsymbol->language == language_cplus)
{
gdb_assert (gsymbol->language_specific.cplus_specific != NULL);
return gsymbol->language_specific.cplus_specific->demangled_name;
if (gsymbol->language_specific.cplus_specific != NULL)
return gsymbol->language_specific.cplus_specific->demangled_name;
else
return NULL;
}
else
return gsymbol->language_specific.mangled_lang.demangled_name;