Move signatured_type::type to unshareable object
authorTom Tromey <tom@tromey.com>
Wed, 27 May 2020 15:19:35 +0000 (11:19 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 27 May 2020 15:19:35 +0000 (11:19 -0400)
commite286671bf99ab870d67431068e863c1c57631b1f
tree7f7d93ab206ed9e3300dad71bb0940634bf4ebbd
parent8adb84872b7b039c70f5448f6cf5fe7dfc79d367
Move signatured_type::type to unshareable object

signatured_type has a link to the "struct type".  However, types are
inherently objfile-specific, so once sharing is implemented, this will
be incorrect.

This patch moves the type to a new map in the DWARF unshareable
object.

gdb/ChangeLog:

YYYY-MM-DD  Tom Tromey  <tom@tromey.com>
YYYY-MM-DD  Simon Marchi  <simon.marchi@efficios.com>

* dwarf2/read.h (struct dwarf2_per_objfile)
<get_type_for_signatured_type, set_type_for_signatured_type>:
New methods.
<m_type_map>: New member.
(struct signatured_type) <type>: Remove.
* dwarf2/read.c
(dwarf2_per_objfile::get_type_for_signatured_type,
dwarf2_per_objfile::set_type_for_signatured_type): New.
(get_signatured_type): Use new methods.

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