]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/ChangeLog
Do not separately read type units
authorTom Tromey <tom@tromey.com>
Fri, 30 Apr 2021 20:07:58 +0000 (14:07 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 30 Apr 2021 20:07:58 +0000 (14:07 -0600)
commitb8efb248a88cb9c6760b44b5f7cfa4cb1b8dc004
tree5523ba72c09a75c49eaec59bf92c2e87405db93f
parent91eea9cc48a17763dae5a4f10eaa111c512ee2d0
Do not separately read type units

Currently, the DWARF reader has a separate pass to read type units --
create_all_type_units.  While working on other patches, I discovered
that this caused DWARF 5 type units to be read twice, once by
create_all_comp_units and once by create_all_type_units.

There's no need any more (if there ever was) to treat type units
differently from CUs.  So, this patch removes create_all_type_units
and unifies the code paths.

Note that the DWO code still has a second pass.  I haven't looked into
this code yet; perhaps it can also be simplified.

Regression tested using the debug-types board file on x86-64 Fedora 32.

gdb/ChangeLog
2021-04-30  Tom Tromey  <tom@tromey.com>

* dwarf2/read.c (dwarf2_initialize_objfile): Update.
(add_signatured_type_cu_to_table): Remove.
(create_debug_type_hash_table): Assume dwo_file is non-null.
(create_debug_types_hash_table): Update comment.
(create_all_type_units): Remove.
(sort_tu_by_abbrev_offset): Update comment.
(build_type_psymtabs): Rename from build_type_psymtabs_1.
(build_type_psymtabs): Remove.
(process_skeletonless_type_unit, dwarf2_build_psymtabs_hard):
Update.
(read_comp_units_from_section): Add types_htab, section_kind
parameters.
(create_all_comp_units): Read type units.
gdb/ChangeLog
gdb/dwarf2/read.c