|
From: <sv...@va...> - 2008-08-20 08:59:28
|
Author: sewardj
Date: 2008-08-20 09:59:37 +0100 (Wed, 20 Aug 2008)
New Revision: 8535
Log:
Merge (from trunk) r8534 (handle Dwarf3 from gcc-4.3)
Modified:
branches/HGDEV/coregrind/m_debuginfo/readdwarf3.c
Modified: branches/HGDEV/coregrind/m_debuginfo/readdwarf3.c
===================================================================
--- branches/HGDEV/coregrind/m_debuginfo/readdwarf3.c 2008-08-20 08:14:07 UTC (rev 8534)
+++ branches/HGDEV/coregrind/m_debuginfo/readdwarf3.c 2008-08-20 08:59:37 UTC (rev 8535)
@@ -2097,7 +2097,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;
@@ -2109,7 +2113,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 );
|