Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: sami wagiaalla <swagiaal@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: [patch 1/3] Change cplus_specific to an alocated struct
Date: Mon, 12 Jul 2010 18:03:00 -0000	[thread overview]
Message-ID: <4C3B5907.2080200@redhat.com> (raw)
In-Reply-To: <m3pqzrucpg.fsf@fleche.redhat.com>

[-- Attachment #1: Type: text/plain, Size: 53 bytes --]

This patch cplus_specific is renamed to mangled_lang

[-- Attachment #2: dynamic-cplus_specific_1.patch --]
[-- Type: text/plain, Size: 5110 bytes --]

commit 91022b44617e9fbf1430280fa4f6b3476a4b015d
Author: Sami Wagiaalla <swagiaal@redhat.com>
Date:   Wed Jul 7 13:45:46 2010 -0400

    Rename cplus_specific mangled_lang.
    
    2010-07-12  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.

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 bab1fba..8dd239d 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -8673,8 +8673,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 cada00e..7e9873e 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 5b109ce..ded0ae3 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -124,12 +124,12 @@ struct general_symbol_info
 
   union
   {
-    struct cplus_specific
+    struct mangled_lang
     {
       /* This is in fact used for C++, Java, and Objective C.  */
       char *demangled_name;
     }
-    cplus_specific;
+    mangled_lang;
   }
   language_specific;
 

  reply	other threads:[~2010-07-12 18:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-26 16:05 [patch] " sami wagiaalla
2010-05-26 16:55 ` sami wagiaalla
2010-06-08 17:02 ` Tom Tromey
2010-06-14 19:29   ` sami wagiaalla
2010-06-15 22:56     ` Tom Tromey
2010-07-12 18:03       ` sami wagiaalla [this message]
2010-07-13 17:16         ` [patch 1/3] " Tom Tromey
2010-07-16 14:15           ` sami wagiaalla
2010-07-16 15:24             ` Tom Tromey
2010-07-12 18:06       ` [patch 2/3] " sami wagiaalla
2010-07-13 17:24         ` Tom Tromey
2010-07-16 14:15           ` sami wagiaalla
2010-07-12 18:08       ` [patch 3/3] " sami wagiaalla
2010-07-13 17:38         ` Tom Tromey
2010-07-16 14:15           ` sami wagiaalla
2010-07-16 15:29             ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C3B5907.2080200@redhat.com \
    --to=swagiaal@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox