summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2004-02-21 21:08:33 +0000
committerDaniel Jacobowitz <dan@debian.org>2004-02-21 21:08:33 +0000
commit9394def075d80f60be923ef5b76cdaa006b0bf35 (patch)
treee7afde0c87fe214c848b2c9102f45fa5ac2c0c49
parent09a0b84d4b0eed5d7022ec5f6cb535967f65c0e4 (diff)
downloadgdb-9394def075d80f60be923ef5b76cdaa006b0bf35.tar.gz
* dwarf2read.c (load_partial_dies): Follow unions. Follow
aggregates for all non-C languages.
-rw-r--r--gdb/ChangeLog.intercu5
-rw-r--r--gdb/dwarf2read.c13
2 files changed, 12 insertions, 6 deletions
diff --git a/gdb/ChangeLog.intercu b/gdb/ChangeLog.intercu
index 087fe18a416..090af73f276 100644
--- a/gdb/ChangeLog.intercu
+++ b/gdb/ChangeLog.intercu
@@ -1,5 +1,10 @@
2004-02-21 Daniel Jacobowitz <drow@mvista.com>
+ * dwarf2read.c (load_partial_dies): Follow unions. Follow
+ aggregates for all non-C languages.
+
+2004-02-21 Daniel Jacobowitz <drow@mvista.com>
+
* dwarf2read.c (dwarf2_build_psymtabs_hard): Estimate the initial
size of the hash table.
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index e7749733053..084392895e4 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -4599,16 +4599,17 @@ load_partial_dies (bfd *abfd, char *info_ptr, struct dwarf2_cu *cu)
part_die = obstack_alloc (&cu->partial_die_obstack,
sizeof (struct partial_die_info));
- /* For some DIEs we want to follow their children (if any). We do
- not normally follow the children of structures; do so for C++
- so that we can use method physnames to infer fully qualified
- type names. */
+ /* For some DIEs we want to follow their children (if any). For C
+ we have no reason to follow the children of structures; for other
+ languages we have to, both so that we can get at method physnames
+ to infer fully qualified class names, and for DW_AT_specification. */
if (last_die->has_children
&& (last_die->tag == DW_TAG_namespace
|| last_die->tag == DW_TAG_enumeration_type
- || (cu->language == language_cplus
+ || (cu->language != language_c
&& (last_die->tag == DW_TAG_class_type
- || last_die->tag == DW_TAG_structure_type))))
+ || last_die->tag == DW_TAG_structure_type
+ || last_die->tag == DW_TAG_union_type))))
{
nesting_level++;
parent_die = last_die;