Re: [PATCH v2 10/28] Have expand_symtabs_matching work for already-expanded CUs

Tom Tromey
2025-04-23T20:58:04Z

>>> + if (!this_cu->files_read)
>>> + dw2_get_file_names_reader (reader.cu (), reader.top_level_die ());

Simon> In other spots, this is initialized lazily when something calls
Simon> dw2_get_file_names. Why would it not work with expand_symtabs_matching?

Tom> It's been a long time since I wrote this but my recollection is that if
Tom> the CU is already expanded, then this is never done.

Tom> I will take another look.

FWIW one benefit to doing the call here is that the cutu_reader has
already been constructed. So, it is more efficient.

I'll remove it and try to reproduce the crash though.

Tom