aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2010-08-31 20:03:20 +0000
committerTom Tromey <tromey@redhat.com>2010-08-31 20:03:20 +0000
commit6438229074032cc548209c05c42bd57873a72651 (patch)
treea2422933f7e9aa9eeace3ef4a0c7c71ca7b5a152
parent8bbed40521ffa3852a201d249162567ee6d5b8ec (diff)
downloadgdb-6438229074032cc548209c05c42bd57873a72651.zip
gdb-6438229074032cc548209c05c42bd57873a72651.tar.gz
gdb-6438229074032cc548209c05c42bd57873a72651.tar.bz2
PR c++/11961:
* dwarf2read.c (new_symbol_full) <DW_TAG_template_type_param>: Don't set TYPE_NAME on the type.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/dwarf2read.c27
2 files changed, 20 insertions, 13 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1febb54..89d6156 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index ac954e6..c531864 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -10729,20 +10729,21 @@ new_symbol_full (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
&& (cu->language == language_cplus
|| cu->language == language_java)
? &global_symbols : cu->list_in_scope);
- }
- /* 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;