* dwarf2read.c (create_addrmap_from_index): Complain about bad CU
index numbers.
This commit is contained in:
parent
e4a48d9d49
commit
f652bce2ee
|
@ -1,5 +1,8 @@
|
||||||
2013-03-28 Doug Evans <dje@google.com>
|
2013-03-28 Doug Evans <dje@google.com>
|
||||||
|
|
||||||
|
* dwarf2read.c (create_addrmap_from_index): Complain about bad CU
|
||||||
|
index numbers.
|
||||||
|
|
||||||
* dwarf2read.c (dw2_get_file_names): Delete arg "objfile".
|
* dwarf2read.c (dw2_get_file_names): Delete arg "objfile".
|
||||||
All callers updated.
|
All callers updated.
|
||||||
(dw2_print_stats): Print #read CUs too.
|
(dw2_print_stats): Print #read CUs too.
|
||||||
|
|
|
@ -2530,9 +2530,18 @@ create_addrmap_from_index (struct objfile *objfile, struct mapped_index *index)
|
||||||
iter += 8;
|
iter += 8;
|
||||||
cu_index = extract_unsigned_integer (iter, 4, BFD_ENDIAN_LITTLE);
|
cu_index = extract_unsigned_integer (iter, 4, BFD_ENDIAN_LITTLE);
|
||||||
iter += 4;
|
iter += 4;
|
||||||
|
|
||||||
addrmap_set_empty (mutable_map, lo + baseaddr, hi + baseaddr - 1,
|
if (cu_index < dwarf2_per_objfile->n_comp_units)
|
||||||
dw2_get_cu (cu_index));
|
{
|
||||||
|
addrmap_set_empty (mutable_map, lo + baseaddr, hi + baseaddr - 1,
|
||||||
|
dw2_get_cu (cu_index));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
complaint (&symfile_complaints,
|
||||||
|
_(".gdb_index address table has invalid CU number %u"),
|
||||||
|
(unsigned) cu_index);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
objfile->psymtabs_addrmap = addrmap_create_fixed (mutable_map,
|
objfile->psymtabs_addrmap = addrmap_create_fixed (mutable_map,
|
||||||
|
|
Loading…
Reference in New Issue