]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Make the absolute bare minimum changes needed to stop the Dwarf3
authorJulian Seward <jseward@acm.org>
Wed, 20 Aug 2008 08:14:07 +0000 (08:14 +0000)
committerJulian Seward <jseward@acm.org>
Wed, 20 Aug 2008 08:14:07 +0000 (08:14 +0000)
variable & type reader dying on gcc-4.3.x produced Dwarf3.  This is
done by handling DW_TAG_class_type and treating it the same as
DW_TAG_structure_type.  I don't know if this is really correct or not.

This reader is still grossly inefficient in terms of space use, and
could be majorly improved, by storing information in arrays rather
than in linked lists with (sometimes) more than 5 million elements.
But this will have to wait.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8534

coregrind/m_debuginfo/readdwarf3.c

index c6a8797775e4153435a62b53a73a87e9459a39e1..ec33bde82161c3482135949bcbd1c6c73f41b461 100644 (file)
@@ -2195,7 +2195,11 @@ static void parse_type_DIE ( /*OUT*/TyAdmin** admin,
       goto acquire_Atom;
    }
 
-   if (dtag == DW_TAG_structure_type || dtag == DW_TAG_union_type) {
+   /* Treat DW_TAG_class_type as if it was a DW_TAG_structure_type.  I
+      don't know if this is correct, but it at least makes this reader
+      usable for gcc-4.3 produced Dwarf3. */
+   if (dtag == DW_TAG_structure_type || dtag == DW_TAG_class_type
+       || dtag == DW_TAG_union_type) {
       Bool have_szB = False;
       Bool is_decl  = False;
       Bool is_spec  = False;
@@ -2207,7 +2211,8 @@ static void parse_type_DIE ( /*OUT*/TyAdmin** admin,
          = VG_(newXA)( ML_(dinfo_zalloc), ML_(dinfo_free),
                        sizeof(TyAtom*) );
       type->Ty.StOrUn.complete = True;
-      type->Ty.StOrUn.isStruct = dtag == DW_TAG_structure_type;
+      type->Ty.StOrUn.isStruct = dtag == DW_TAG_structure_type 
+                                 || dtag == DW_TAG_class_type;
       while (True) {
          DW_AT   attr = (DW_AT)  get_ULEB128( c_abbv );
          DW_FORM form = (DW_FORM)get_ULEB128( c_abbv );