From 45c58896fccae96ae023059410027791537cb285 Mon Sep 17 00:00:00 2001 From: Sami Wagiaalla Date: Mon, 9 Aug 2010 20:13:51 +0000 Subject: Fixed stabs cplus_specific issue 2010-08-09 Sami Wagiaalla * 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. --- gdb/stabsread.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gdb/stabsread.c') diff --git a/gdb/stabsread.c b/gdb/stabsread.c index 5f6b004..43b09f1 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -712,7 +712,6 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, memcpy (name, string, p - string); name[p - string] = '\0'; new_name = cp_canonicalize_string (name); - cp_scan_for_anonymous_namespaces (sym); } if (new_name != NULL) { @@ -721,6 +720,10 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, } else SYMBOL_SET_NAMES (sym, string, p - string, 1, objfile); + + if (SYMBOL_LANGUAGE (sym) == language_cplus) + cp_scan_for_anonymous_namespaces (sym); + } p++; -- cgit v1.1