]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
parse_type_DIE: push incomplete structure tyents on the type stack,
authorJulian Seward <jseward@acm.org>
Mon, 10 Aug 2009 18:59:54 +0000 (18:59 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 10 Aug 2009 18:59:54 +0000 (18:59 +0000)
since gcc-4.4 on Fedora 11 will create DW_TAG_member entries within
it, and we need to have a plausible parent type on the stack.

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

coregrind/m_debuginfo/readdwarf3.c

index fff92d54669139e661c31a2ca1285e212e1a567c..174b9d2c80fd796e2c51b00132706272376ec01f 100644 (file)
@@ -2307,6 +2307,14 @@ static void parse_type_DIE ( /*MOD*/XArray* /* of TyEnt */ tyents,
          if (typeE.Te.TyStOrUn.name == NULL)
             goto bad_DIE;
          typeE.Te.TyStOrUn.complete = False;
+         /* JRS 2009 Aug 10: <possible kludge>? */
+         /* Push this tyent on the stack, even though it's incomplete.
+            It appears that gcc-4.4 on Fedora 11 will sometimes create
+            DW_TAG_member entries for it, and so we need to have a
+            plausible parent present in order for that to work.  See
+            #200029 comments 8 and 9. */
+         typestack_push( cc, parser, td3, &typeE, level );
+         /* </possible kludge> */
          goto acquire_Type;
       }
       if ((!is_decl) /* && (!is_spec) */) {