+2012-03-13 Doug Evans <dje@google.com>
+
+ * dwarf2read.c (load_partial_comp_unit): Defer adding cu to
+ read_in_chain until we have successfully read it in.
+ (load_full_comp_unit): Ditto.
+ (read_signatured_type): Add comment.
+
2012-03-13 Chris January <chris.january@allinea.com>
* stabsread.c (fix_common_block): Change type of valu argument
do_cleanups (free_cu_cleanup);
return;
}
-
- /* Link this CU into read_in_chain. */
- this_cu->cu->read_in_chain = dwarf2_per_objfile->read_in_chain;
- dwarf2_per_objfile->read_in_chain = this_cu;
}
else
{
/* We've successfully allocated this compilation unit. Let our
caller clean it up when finished with it. */
discard_cleanups (free_cu_cleanup);
+
+ /* Link this CU into read_in_chain. */
+ this_cu->cu->read_in_chain = dwarf2_per_objfile->read_in_chain;
+ dwarf2_per_objfile->read_in_chain = this_cu;
}
}
/* Complete the cu_header. */
cu->header.offset = offset;
cu->header.first_die_offset = info_ptr - beg_of_comp_unit;
-
- /* Link this CU into read_in_chain. */
- per_cu->cu->read_in_chain = dwarf2_per_objfile->read_in_chain;
- dwarf2_per_objfile->read_in_chain = per_cu;
}
else
{
/* We've successfully allocated this compilation unit. Let our
caller clean it up when finished with it. */
discard_cleanups (free_cu_cleanup);
+
+ /* Link this CU into read_in_chain. */
+ per_cu->cu->read_in_chain = dwarf2_per_objfile->read_in_chain;
+ dwarf2_per_objfile->read_in_chain = per_cu;
}
}
clean it up when finished with it. */
discard_cleanups (free_cu_cleanup);
+ /* Link this TU into read_in_chain. */
type_sig->per_cu.cu->read_in_chain = dwarf2_per_objfile->read_in_chain;
dwarf2_per_objfile->read_in_chain = &type_sig->per_cu;
}