forked from Imagelibrary/binutils-gdb
* dwarf2read.c (create_addrmap_from_index): Complain about bad CU
index numbers.
This commit is contained in:
@@ -2530,9 +2530,18 @@ create_addrmap_from_index (struct objfile *objfile, struct mapped_index *index)
|
||||
iter += 8;
|
||||
cu_index = extract_unsigned_integer (iter, 4, BFD_ENDIAN_LITTLE);
|
||||
iter += 4;
|
||||
|
||||
addrmap_set_empty (mutable_map, lo + baseaddr, hi + baseaddr - 1,
|
||||
dw2_get_cu (cu_index));
|
||||
|
||||
if (cu_index < dwarf2_per_objfile->n_comp_units)
|
||||
{
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user