]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Split type_unit_group
authorTom Tromey <tom@tromey.com>
Sat, 22 Feb 2020 00:47:36 +0000 (17:47 -0700)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 12 May 2020 19:24:51 +0000 (15:24 -0400)
commit5b9cfc4c6d8191f7420927b193ea82ffabe2db1e
tree5b775c2cdcfc25b00a94051ee6dc347986ab1f68
parenta35610c98b9993ac8818ecb2674084f1ff62b7df
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.

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.
gdb/dwarf2/read.c
gdb/dwarf2/read.h