diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2020-05-27 11:13:54 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-05-27 11:15:54 -0400 |
commit | 1859c670e9979c1e58ed4e9d83085f732e6936f5 (patch) | |
tree | e41af8237a87c90c2924b16e758981a863e3e6b6 /gdb/dwarf2/index-cache.c | |
parent | 5e22e966a02123478a3c5e067f911a3d180060af (diff) | |
download | binutils-1859c670e9979c1e58ed4e9d83085f732e6936f5.zip binutils-1859c670e9979c1e58ed4e9d83085f732e6936f5.tar.gz binutils-1859c670e9979c1e58ed4e9d83085f732e6936f5.tar.bz2 |
Add dwarf2_per_bfd field to dwarf2_per_cu_data
Some code using dwarf2_per_cu_data objects accesses the corresponding
dwarf2_per_bfd using the following pattern:
per_cu->dwarf2_per_objfile->per_bfd
Since dwarf2_per_cu_data objects are going to become
objfile-independent, the dwarf2_per_objfile link must go. To replace
it, add a dwarf2_per_cu_data->per_bfd link. It makes sense to have it
there because the dwarf2_per_cu_data objects belong to the
dwarf2_per_bfd, so this is essentially just a backlink to their owner.
gdb/ChangeLog:
* dwarf2/read.h (struct dwarf2_per_cu_data) <per_bfd>: New
member.
* dwarf2/read.c (dwarf2_per_bfd::allocate_per_cu): Initialize
dwarf2_per_cu_data::per_bfd.
(dwarf2_per_bfd::allocate_signatured_type): Likewise.
(create_type_unit_group): Likewise.
(queue_comp_unit): Remove reference to
per_cu->dwarf2_per_objfile.
(maybe_queue_comp_unit): Likewise.
(fill_in_sig_entry_from_dwo_entry): Assign new field.
(create_cus_hash_table): Assign new field.
Change-Id: I4ba0a393e64a14489ef061261a3dede1509d055b
Diffstat (limited to 'gdb/dwarf2/index-cache.c')
0 files changed, 0 insertions, 0 deletions