|
From: <sv...@va...> - 2008-08-20 08:14:04
|
Author: sewardj
Date: 2008-08-20 09:14:07 +0100 (Wed, 20 Aug 2008)
New Revision: 8534
Log:
Make the absolute bare minimum changes needed to stop the Dwarf3
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.
Modified:
trunk/coregrind/m_debuginfo/readdwarf3.c
Modified: trunk/coregrind/m_debuginfo/readdwarf3.c
===================================================================
--- trunk/coregrind/m_debuginfo/readdwarf3.c 2008-08-19 18:48:39 UTC (rev 8533)
+++ trunk/coregrind/m_debuginfo/readdwarf3.c 2008-08-20 08:14:07 UTC (rev 8534)
@@ -2195,7 +2195,11 @@
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 @@
= 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 );
|