From: Julian Seward Date: Sat, 30 Jun 2012 20:21:58 +0000 (+0000) Subject: Don't be spooked by DW_TAG_{structure,class,union}_type that has only X-Git-Tag: svn/VALGRIND_3_8_0~177 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b33a0b0bc993272674ed8e167f6b24ce667bf4bb;p=thirdparty%2Fvalgrind.git Don't be spooked by DW_TAG_{structure,class,union}_type that has only a DW_AT_declaration but no name. Just make up a name and add the type. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12691 --- diff --git a/coregrind/m_debuginfo/readdwarf3.c b/coregrind/m_debuginfo/readdwarf3.c index 1654097fdd..44dbc77ef5 100644 --- a/coregrind/m_debuginfo/readdwarf3.c +++ b/coregrind/m_debuginfo/readdwarf3.c @@ -2588,8 +2588,14 @@ static void parse_type_DIE ( /*MOD*/XArray* /* of TyEnt */ tyents, if (is_decl && (!is_spec)) { /* It's a DW_AT_declaration. We require the name but nothing else. */ + /* JRS 2012-06-28: following discussion w/ tromey, if the the + type doesn't have name, just make one up, and accept it. + It might be referred to by other DIEs, so ignoring it + doesn't seem like a safe option. */ if (typeE.Te.TyStOrUn.name == NULL) - goto bad_DIE; + typeE.Te.TyStOrUn.name + = ML_(dinfo_strdup)( "di.readdwarf3.ptD.struct_type.3", + "" ); typeE.Te.TyStOrUn.complete = False; /* JRS 2009 Aug 10: ? */ /* Push this tyent on the stack, even though it's incomplete.