From: Bart Van Assche Date: Mon, 16 Jan 2012 17:11:07 +0000 (+0000) Subject: debug info reader: Add support for DW_TAG_unspecified_type. Closes #278313. X-Git-Tag: svn/VALGRIND_3_8_0~515 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc7b4101763b2d8aa613bb18b736e93d29089baf;p=thirdparty%2Fvalgrind.git debug info reader: Add support for DW_TAG_unspecified_type. Closes #278313. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12338 --- diff --git a/coregrind/m_debuginfo/readdwarf3.c b/coregrind/m_debuginfo/readdwarf3.c index c537004742..3c8c26358a 100644 --- a/coregrind/m_debuginfo/readdwarf3.c +++ b/coregrind/m_debuginfo/readdwarf3.c @@ -2723,6 +2723,21 @@ static void parse_type_DIE ( /*MOD*/XArray* /* of TyEnt */ tyents, goto bad_DIE; } + /* + * Treat DW_TAG_unspecified_type as type void. An example of DW_TAG_unspecified_type: + * + * $ readelf --debug-dump /usr/lib/debug/usr/lib/libstdc++.so.6.0.16.debug + * <1><10d4>: Abbrev Number: 53 (DW_TAG_unspecified_type) + * <10d5> DW_AT_name : (indirect string, offset: 0xdb7): decltype(nullptr) + */ + if (dtag == DW_TAG_unspecified_type) { + VG_(memset)(&typeE, 0, sizeof(typeE)); + typeE.cuOff = D3_INVALID_CUOFF; + typeE.tag = Te_TyQual; + typeE.Te.TyQual.typeR = D3_FAKEVOID_CUOFF; + goto acquire_Type; + } + /* else ignore this DIE */ return; /*NOTREACHED*/