aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/ada-lang.c2
-rw-r--r--gdb/dwarf2read.c4
-rw-r--r--gdb/symtab.c24
-rw-r--r--gdb/symtab.h7
5 files changed, 29 insertions, 18 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1cfa87d..7e7aaa0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 1d4c38b..fabb272 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 6ac503e..8f129b9 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 07910db..dbe6b24 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 62e9ce4..30de42d 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;