Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Fix infinite loop in update_enumeration_type_from_children
@ 2014-10-06 20:50 Daniel Colascione
  2014-10-07 18:07 ` Pedro Alves
  2014-10-08  5:58 ` Doug Evans
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel Colascione @ 2014-10-06 20:50 UTC (permalink / raw)
  To: gdb-patches

[-- 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 --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-11-14  0:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-06 20:50 Fix infinite loop in update_enumeration_type_from_children Daniel Colascione
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox