[0/3] Fix over-eager CU expansion with new DWARF reader

Message ID 20221107162356.3175221-1-tromey@adacore.com
Headers
Series Fix over-eager CU expansion with new DWARF reader |

Message

Tom Tromey Nov. 7, 2022, 4:23 p.m. UTC
  PR symtab/29105 concerns an over-eager CU expansion bug with the new
DWARF reader.  This short series fixes the bug.

The first two patches are tiny refactorings to make the final patch
more understandable.

I don't know how to write a good test for this.  In order to try it,
what I had to do on my machine was to install the glibc debuginfo,
disable the use of the gdb index by hacking dwarf2_initialize_objfile
(Fedora uses .gdb_index in the system debuginfo), and finally run the
sizeof.exp test and try it out by hand, with "set debug symtab-create
1".

Regression tested on x86-64 Fedora 34.  Let me know what you think.

Tom