From afa167257180d762c37b049af6ac6dd9ac0e7dbc Mon Sep 17 00:00:00 2001 From: Sami Wagiaalla Date: Fri, 16 Jul 2010 18:39:10 +0000 Subject: [PATCH] Rename cplus_specific mangled_lang. 2010-07-16 Sami Wagiaalla * symtab.h: Renamed cplus_specific to mangled_lang. * symtab.c (symbol_init_language_specific): Updated. (symbol_set_names): Updated. (symbol_natural_name): Updated. (symbol_demangled_name): Updated. * ada-lang.c (ada_decode_symbol): Updated. * dwarf2read.c (new_symbol): Updated. --- gdb/ChangeLog | 10 ++++++++++ gdb/ada-lang.c | 2 +- gdb/dwarf2read.c | 4 ++-- gdb/symtab.c | 24 ++++++++++++------------ gdb/symtab.h | 7 ++++--- 5 files changed, 29 insertions(+), 18 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1cfa87db0f6..7e7aaa07219 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +2010-07-16 Sami Wagiaalla + + * symtab.h: Renamed cplus_specific to mangled_lang. + * symtab.c (symbol_init_language_specific): Updated. + (symbol_set_names): Updated. + (symbol_natural_name): Updated. + (symbol_demangled_name): Updated. + * ada-lang.c (ada_decode_symbol): Updated. + * dwarf2read.c (new_symbol): Updated. + 2010-07-14 Ken Werner * valops.c (value_assign): Do not call to value_coerce_to_target. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 1d4c38b8d37..fabb2728d5c 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -1210,7 +1210,7 @@ char * ada_decode_symbol (const struct general_symbol_info *gsymbol) { char **resultp = - (char **) &gsymbol->language_specific.cplus_specific.demangled_name; + (char **) &gsymbol->language_specific.mangled_lang.demangled_name; if (*resultp == NULL) { diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 6ac503e2f28..8f129b99d3b 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -9743,8 +9743,8 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu) /* Fortran does not have mangling standard and the mangling does differ between gfortran, iFort etc. */ if (cu->language == language_fortran - && sym->ginfo.language_specific.cplus_specific.demangled_name == NULL) - sym->ginfo.language_specific.cplus_specific.demangled_name + && sym->ginfo.language_specific.mangled_lang.demangled_name == NULL) + sym->ginfo.language_specific.mangled_lang.demangled_name = (char *) dwarf2_full_name (name, die, cu); /* Default assumptions. diff --git a/gdb/symtab.c b/gdb/symtab.c index 07910dbe349..dbe6b248150 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -354,7 +354,7 @@ symbol_init_language_specific (struct general_symbol_info *gsymbol, || gsymbol->language == language_objc || gsymbol->language == language_fortran) { - gsymbol->language_specific.cplus_specific.demangled_name = NULL; + gsymbol->language_specific.mangled_lang.demangled_name = NULL; } else { @@ -537,7 +537,7 @@ symbol_set_names (struct general_symbol_info *gsymbol, memcpy (gsymbol->name, linkage_name, len); gsymbol->name[len] = '\0'; } - gsymbol->language_specific.cplus_specific.demangled_name = NULL; + gsymbol->language_specific.mangled_lang.demangled_name = NULL; return; } @@ -633,10 +633,10 @@ symbol_set_names (struct general_symbol_info *gsymbol, gsymbol->name = (*slot)->mangled + lookup_len - len; if ((*slot)->demangled[0] != '\0') - gsymbol->language_specific.cplus_specific.demangled_name + gsymbol->language_specific.mangled_lang.demangled_name = (*slot)->demangled; else - gsymbol->language_specific.cplus_specific.demangled_name = NULL; + gsymbol->language_specific.mangled_lang.demangled_name = NULL; } /* Return the source code name of a symbol. In languages where @@ -652,12 +652,12 @@ symbol_natural_name (const struct general_symbol_info *gsymbol) case language_java: case language_objc: case language_fortran: - if (gsymbol->language_specific.cplus_specific.demangled_name != NULL) - return gsymbol->language_specific.cplus_specific.demangled_name; + if (gsymbol->language_specific.mangled_lang.demangled_name != NULL) + return gsymbol->language_specific.mangled_lang.demangled_name; break; case language_ada: - if (gsymbol->language_specific.cplus_specific.demangled_name != NULL) - return gsymbol->language_specific.cplus_specific.demangled_name; + if (gsymbol->language_specific.mangled_lang.demangled_name != NULL) + return gsymbol->language_specific.mangled_lang.demangled_name; else return ada_decode_symbol (gsymbol); break; @@ -679,12 +679,12 @@ symbol_demangled_name (const struct general_symbol_info *gsymbol) case language_java: case language_objc: case language_fortran: - if (gsymbol->language_specific.cplus_specific.demangled_name != NULL) - return gsymbol->language_specific.cplus_specific.demangled_name; + if (gsymbol->language_specific.mangled_lang.demangled_name != NULL) + return gsymbol->language_specific.mangled_lang.demangled_name; break; case language_ada: - if (gsymbol->language_specific.cplus_specific.demangled_name != NULL) - return gsymbol->language_specific.cplus_specific.demangled_name; + if (gsymbol->language_specific.mangled_lang.demangled_name != NULL) + return gsymbol->language_specific.mangled_lang.demangled_name; else return ada_decode_symbol (gsymbol); break; diff --git a/gdb/symtab.h b/gdb/symtab.h index 62e9ce45ebd..30de42d241f 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -124,12 +124,13 @@ struct general_symbol_info union { - struct cplus_specific + /* This is used by languages which wish to store a demangled name. + currently used by Ada, Java, and Objective C.*/ + struct mangled_lang { - /* This is in fact used for C++, Java, and Objective C. */ char *demangled_name; } - cplus_specific; + mangled_lang; } language_specific; -- 2.30.2