Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Colascione <dancol@dancol.org>
To: gdb-patches@sourceware.org
Subject: Fix infinite loop in update_enumeration_type_from_children
Date: Mon, 06 Oct 2014 20:50:00 -0000	[thread overview]
Message-ID: <543300A0.50705@dancol.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 738 bytes --]

diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 9d0ee13..d324b6d 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -13247,12 +13247,16 @@ update_enumeration_type_from_children (struct
die_info *die,
       const gdb_byte *bytes;
       struct dwarf2_locexpr_baton *baton;
       const char *name;
-      if (child_die->tag != DW_TAG_enumerator)
+      if (child_die->tag != DW_TAG_enumerator) {
+	child_die = sibling_die (child_die);
 	continue;
+      }

       attr = dwarf2_attr (child_die, DW_AT_const_value, cu);
-      if (attr == NULL)
+      if (attr == NULL) {
+	child_die = sibling_die (child_die);
 	continue;
+      }

       name = dwarf2_name (child_die, cu);
       if (name == NULL)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

             reply	other threads:[~2014-10-06 20:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-06 20:50 Daniel Colascione [this message]
2014-10-07 18:07 ` Pedro Alves
2014-10-08  5:58 ` Doug Evans
2014-11-09 22:05   ` Daniel Colascione
2014-11-12 15:52     ` Doug Evans
2014-11-14  0:39       ` [COMMITTED PATCH] " Doug Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=543300A0.50705@dancol.org \
    --to=dancol@dancol.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox