Move die_type_hash to dwarf2_per_objfile
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 27 May 2020 15:13:51 +0000 (11:13 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 27 May 2020 15:15:54 +0000 (11:15 -0400)
commitae090bdbf8876d4f72f357cf78301b5e8ec13751
tree029dac3fd824c40ed0b3d8ffa440eb38b65047d0
parentaf758d117e1454daebc6135cb70529b9843c3437
Move die_type_hash to dwarf2_per_objfile

The die_type_hash field can't be shared between multiple obfiles, as it
holds `struct type` objects, which are objfile-specific.  Move it from
dwarf2_per_bfd to dwarf2_per_objfile and update all references.

gdb/ChangeLog:

* dwarf2/read.h (struct dwarf2_per_bfd) <die_type_hash>: Move to
struct dwarf2_per_objfile.
(struct dwarf2_per_objfile) <die_type_hash>: Move from struct
dwarf2_per_bfd.
* dwarf2/read.c (set_die_type): Update.
(get_die_type_at_offset): Update.

Change-Id: I3589777ed3579bcabafd2ba859d27babe4502bfb
gdb/ChangeLog
gdb/dwarf2/read.c
gdb/dwarf2/read.h