Set per_bfd->partial_symtabs earlier
dwarf2_build_psymtabs sets per_bfd->partial_symtabs at its end, in
order to facilitate sharing.
However, in order to diassociate partial symtabs from the objfile, we
want to change the DWARF reader to reference partial symtabs via the
per_bfd. So, we want to set this reference before reading psymtabs.
This is safe to do because the assignment is done unconditionally.
gdb/ChangeLog
2021-03-20 Tom Tromey <tom@tromey.com>
* dwarf2/read.c (dwarf2_build_psymtabs): Set partial_symtabs
earlier.