blarsen / rpms / gdb

Forked from rpms/gdb 2 years ago
Clone
Blob Blame History Raw
http://sourceware.org/ml/gdb-cvs/2010-08/msg00203.html

[ Backported.  ]

### src/gdb/ChangeLog	2010/08/31 19:31:00	1.12131
### src/gdb/ChangeLog	2010/08/31 20:03:20	1.12132
## -1,3 +1,9 @@
+2010-08-31  Tom Tromey  <tromey@redhat.com>
+
+	PR c++/11961:
+	* dwarf2read.c (new_symbol_full) <DW_TAG_template_type_param>:
+	Don't set TYPE_NAME on the type.
+
 2010-08-31  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
 
 	* infrun.c (set_exec_direction_func): Error out if target does not
--- gdb-7.2/gdb/dwarf2read.c.orig	2011-01-03 08:01:35.000000000 +0100
+++ gdb-7.2/gdb/dwarf2read.c	2011-01-03 08:14:01.000000000 +0100
@@ -10636,20 +10636,21 @@ variable_or_member:
 			       ? &global_symbols : cu->list_in_scope);
 
 		add_symbol_to_list (sym, list_to_add);
-	      }
 
-	    /* The semantics of C++ state that "struct foo { ... }" also
-	       defines a typedef for "foo".  A Java class declaration also
-	       defines a typedef for the class.  */
-	    if (cu->language == language_cplus
-		|| cu->language == language_java
-		|| cu->language == language_ada)
-	      {
-		/* The symbol's name is already allocated along with
-		   this objfile, so we don't need to duplicate it for
-		   the type.  */
-		if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0)
-		  TYPE_NAME (SYMBOL_TYPE (sym)) = SYMBOL_SEARCH_NAME (sym);
+		/* The semantics of C++ state that "struct foo {
+		   ... }" also defines a typedef for "foo".  A Java
+		   class declaration also defines a typedef for the
+		   class.  */
+		if (cu->language == language_cplus
+		    || cu->language == language_java
+		    || cu->language == language_ada)
+		  {
+		    /* The symbol's name is already allocated along
+		       with this objfile, so we don't need to
+		       duplicate it for the type.  */
+		    if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0)
+		      TYPE_NAME (SYMBOL_TYPE (sym)) = SYMBOL_SEARCH_NAME (sym);
+		  }
 	      }
 	  }
 	  break;