Remove "keep" parameter from cutu_reader constructor
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:55 +0000 (13:43 -0700)
commit6751ebaea074088b6e30ad885669cd65b8608d20
treed852c16fdee275792168538b19298afa86b7a7cb
parent135f543748f651938774666649bb0365018d62da
Remove "keep" parameter from cutu_reader constructor

cutu_reader has a "keep" parameter, which is used to decide what to do
with a new CU when the reader is destroyed.  Most code does not try to
preserve the CU, so this patch removes this parameter and instead adds
a new method that users can call to preserve the CU on the chain.

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

* dwarf2/read.c (class cutu_reader) <cutu_reader,
init_tu_and_read_dwo_dies>: Remove "keep" parameter.
<keep>: Declare method.
<m_keep>: Remove member.
<~cutu_reader>: Remove.
(cutu_reader::init_tu_and_read_dwo_dies): Update.
(cutu_reader::cutu_reader): Update.
(cutu_reader::keep): Rename from ~cutu_reader.
(process_psymtab_comp_unit, build_type_psymtabs_1)
(process_skeletonless_type_unit, load_partial_comp_unit)
(load_full_comp_unit, dwarf2_read_addr_index)
(read_signatured_type): Update.

Change-Id: I859b1c64313569d76d46317c14e9b077ebc3a27b
gdb/ChangeLog
gdb/dwarf2/read.c