Change dwarf2_per_objfile::signatured_types to be htab_up
authorTom Tromey <tom@tromey.com>
Sat, 8 Feb 2020 20:40:54 +0000 (13:40 -0700)
committerTom Tromey <tom@tromey.com>
Sat, 8 Feb 2020 20:43:03 +0000 (13:43 -0700)
commitb0b6a9878a472438a6fe2e93be819546efc5033a
tree1178c3d311b6f879acbeabef441a6a8fa9781332
parent39856def4f717a1d938b80f76d86202dd88abc10
Change dwarf2_per_objfile::signatured_types to be htab_up

This changes dwarf2_per_objfile::signatured_types to be an htab_up.
This in turn lets us change it not to use the objfile obstack for
allocation; obstack allocation for hash tables is a bad practice
because it leads to excess memory use if the table is ever resized.

gdb/ChangeLog
2020-02-08  Tom Tromey  <tom@tromey.com>

* dwarf2/read.h (struct dwarf2_per_objfile) <signatured_types>:
Change type to htab_up.
* dwarf2/read.c (create_signatured_type_table_from_index)
(create_signatured_type_table_from_debug_names)
(create_all_type_units, add_type_unit)
(lookup_dwo_signatured_type, lookup_signatured_type)
(process_skeletonless_type_unit): Update.
(create_debug_type_hash_table, create_debug_types_hash_table):
Change type of types_htab.
(allocate_signatured_type_table, allocate_dwo_unit_table): Return
htab_up.  Don't allocate on obstack.
(create_cus_hash_table): Change type of cus_htab parameter.
(struct dwo_file) <cus, tus>: Now htab_up.
(lookup_dwo_signatured_type, lookup_dwo_cutu)
(process_dwo_file_for_skeletonless_type_units, lookup_dwo_cutu)
(queue_and_load_all_dwo_tus): Update.
* dwarf2/index-write.c (write_gdbindex): Update.
(write_debug_names): Update.

Change-Id: I290a209b96945fb5f415c82723b62830e9c4b467
gdb/ChangeLog
gdb/dwarf2/index-write.c
gdb/dwarf2/read.c
gdb/dwarf2/read.h
This page took 0.025955 seconds and 4 git commands to generate.