Re: [0/4] RFC: add DWARF index support

Tom Tromey
2010-07-22T14:14:19Z

>>>>> "Paul" == Paul Pluzhnikov <ppluzhnikov@google.com> writes:

Paul> I am seeing crashes in code which appears to have been committed
Paul> in this patch:

Paul> I've briefly perused dwarf2read.c, and didn't find a place that
Paul> insures that per_cu->objfile is initialized :-(

Sorry about that.

The immediate problem is that a dwarf2_per_cu_data is embedded in struct
signatured_type, and initialized in create_debug_types_hash_table. This
embedded struct doesn't get its objfile member initialized.

The other places allocating a dwarf2_per_cu_data are
create_all_comp_units and create_cus_from_index. Those places do
initialize that member.

The bigger problem is that I completely forgot about .debug_types.
I am not certain that a simple fix will work if we have both
.debug_types and .gdb_index. I will try that out.

Tom