Split type_unit_group
type_unit_group has links to the compunit_symtab and other symtabs.
However, once this object is shared across objfiles, this will no
longer be ok.
This patch introduces a new type_unit_group_unshareable and arranges to
store a map from type unit groups to type_unit_group_unshareable objects
in dwarf2_per_objfile.
gdb/ChangeLog:
YYYY-MM-DD Tom Tromey <tom@tromey.com>
YYYY-MM-DD Simon Marchi <simon.marchi@efficios.com>
* dwarf2/read.h (struct type_unit_group_unshareable): New.
(struct dwarf2_per_objfile) <type_units>: New member.
<get_type_unit_group_unshareable>: New method.
* dwarf2/read.c (struct type_unit_group) <compunit_symtab,
num_symtabs, symtabs>: Remove; move to
type_unit_group_unshareable.
(dwarf2_per_objfile::get_type_unit_group_unshareable): New.
(process_full_type_unit, dwarf2_cu::setup_type_unit_groups)
(dwarf2_cu::setup_type_unit_groups): Use type_unit_group_unshareable.
Change-Id: I1fec2fab59e0ec40fee3614fc821172a469c0e41