+2014-11-13 Doug Evans <dje@google.com>
+
+ * dwarf2read.c (update_enumeration_type_from_children): Avoid
+ infinite loop.
+
2014-11-13 Jan Kratochvil <jan.kratochvil@redhat.com>
* NEWS (maint set target-async): Fix typo.
struct dwarf2_cu *cu)
{
struct obstack obstack;
- struct die_info *child_die = die->child;
+ struct die_info *child_die;
int unsigned_enum = 1;
int flag_enum = 1;
ULONGEST mask = 0;
obstack_init (&obstack);
old_chain = make_cleanup_obstack_free (&obstack);
- while (child_die != NULL && child_die->tag)
+ for (child_die = die->child;
+ child_die != NULL && child_die->tag;
+ child_die = sibling_die (child_die))
{
struct attribute *attr;
LONGEST value;
const gdb_byte *bytes;
struct dwarf2_locexpr_baton *baton;
const char *name;
+
if (child_die->tag != DW_TAG_enumerator)
continue;
a flag type, no need to look at the rest of the enumerates. */
if (!unsigned_enum && !flag_enum)
break;
- child_die = sibling_die (child_die);
}
if (unsigned_enum)