Rename cplus_specific mangled_lang.
authorSami Wagiaalla <swagiaal@redhat.com>
Fri, 16 Jul 2010 18:39:10 +0000 (18:39 +0000)
committerSami Wagiaalla <swagiaal@redhat.com>
Fri, 16 Jul 2010 18:39:10 +0000 (18:39 +0000)
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.

gdb/ChangeLog
gdb/ada-lang.c
gdb/dwarf2read.c
gdb/symtab.c
gdb/symtab.h

index 1cfa87db0f6b098b17790b8710b8390d722e4df7..7e7aaa072191aeea2c031694176f0f09a2386aee 100644 (file)
@@ -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.
index 1d4c38b8d37e8ed20f58cde3879af6a85310f587..fabb2728d5cbb9442b377d6b7794f745a6e744ba 100644 (file)
@@ -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)
     {
index 6ac503e2f28460699692b1f3c88d6a25e68f4dbe..8f129b99d3b78862ed20028e8a9af25806ed8364 100644 (file)
@@ -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.
index 07910dbe3497cd91cb62f11a887d4350e99966fb..dbe6b248150495fd7191848d5fd2fb07927dbae6 100644 (file)
@@ -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;
index 62e9ce45ebd7b9f1040d29df647f4c1c31125f7f..30de42d241fad0af88b90b7e64ca6290f0814a9a 100644 (file)
@@ -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;