Set per_bfd->partial_symtabs earlier
authorTom Tromey <tom@tromey.com>
Sat, 20 Mar 2021 23:23:40 +0000 (17:23 -0600)
committerTom Tromey <tom@tromey.com>
Sat, 20 Mar 2021 23:23:43 +0000 (17:23 -0600)
commit51962708bd3701780ac9ffd99a70d8eb2149a376
tree505ef41d69854c52b1a9e538efba1d810f694325
parent484b1090630d273dfb70ee96b152ec6b527a1b65
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.
gdb/ChangeLog
gdb/dwarf2/read.c