]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* dwarf2read.c (load_partial_dies): Follow unions. Follow
authorDaniel Jacobowitz <drow@false.org>
Sat, 21 Feb 2004 21:08:33 +0000 (21:08 +0000)
committerDaniel Jacobowitz <drow@false.org>
Sat, 21 Feb 2004 21:08:33 +0000 (21:08 +0000)
aggregates for all non-C languages.

gdb/ChangeLog.intercu
gdb/dwarf2read.c

index 087fe18a41626c8f2be14d69298a3a3d4ad443ea..090af73f276825861b2f28f5cc98d5a522c50bc7 100644 (file)
@@ -1,3 +1,8 @@
+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
index e77497330537ce281fe0c1a63a099aedbecc1b59..084392895e40f0bd833e9f0c599bce50cdb6cbac 100644 (file)
@@ -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;