]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Accept 'enum' type DIEs that do not have any names; apparently Dwarf2
authorJulian Seward <jseward@acm.org>
Sat, 24 Jan 2009 01:44:15 +0000 (01:44 +0000)
committerJulian Seward <jseward@acm.org>
Sat, 24 Jan 2009 01:44:15 +0000 (01:44 +0000)
allows this.  Patch from Nuno Lopes.  #181707.
MERGE TO 3_4_BRANCH

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

coregrind/m_debuginfo/readdwarf3.c

index 23625d7f5a91466261d5408ca493b358e3192d1b..94c05e262c6216c160f73a2e67c6505a6039367f 100644 (file)
@@ -2236,9 +2236,14 @@ static void parse_type_DIE ( /*MOD*/XArray* /* of TyEnt */ tyents,
             typeE.Te.TyEnum.szB = cts;
          }
       }
+
+      if (!typeE.Te.TyEnum.name)
+         typeE.Te.TyEnum.name 
+            = ML_(dinfo_strdup)( "di.readdwarf3.pTD.enum_type.3",
+                                 "<anon_enum_type>" );
+
       /* Do we have something that looks sane? */
-      if (typeE.Te.TyEnum.szB == 0 /* we must know the size */
-         /* But the name can be present, or not */)
+      if (typeE.Te.TyEnum.szB == 0 /* we must know the size */)
          goto bad_DIE;
       /* On't stack! */
       typestack_push( cc, parser, td3, &typeE, level );