[ was: Re: [committed][gdb/symtab] Fix bad compile unit index complaint ] On 7/21/22 13:10, Tom de Vries wrote: > [ was: Re: [PATCH][gdb/symtab] Force usage of all_comp_units.size > (CU/TU/CUTU) ] > > On 7/14/22 16:43, Tom de Vries wrote: >> Hi, >> >> I noticed this code in dw2_debug_names_iterator::next: >> ... >>          case DW_IDX_compile_unit: >>            /* Don't crash on bad data.  */ >>            if (ull >= per_bfd->all_comp_units.size ()) >>              { >>                complaint (_(".debug_names entry has bad CU index %s" >>                             " [in module %s]"), >>                           pulongest (ull), >>                           objfile_name (objfile)); >>                continue; >>              } >>            per_cu = per_bfd->get_cu (ull); >>            break; >> ... >> >> This code used to DTRT, before we started keeping both CUs and TUs in >> all_comp_units. >> > > I've dropped the all_comp_units.size (CU/TU/CUTU) part, since that > somewhat violates the One-Patch-Per-Independent=Change rule. And here is it, independent of the dw2_debug_names_iterator::next issue. Thanks, - Tom