Rename cplus_specific mangled_lang.
2010-07-16 Sami Wagiaalla <swagiaal@redhat.com> * 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.
This commit is contained in:
parent
183e4ed8bc
commit
afa1672571
5 changed files with 29 additions and 18 deletions
|
@ -1,3 +1,13 @@
|
|||
2010-07-16 Sami Wagiaalla <swagiaal@redhat.com>
|
||||
|
||||
* 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 <ken.werner@de.ibm.com>
|
||||
|
||||
* valops.c (value_assign): Do not call to value_coerce_to_target.
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
|
24
gdb/symtab.c
24
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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue