Remove DWARF queue-related globals
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:41:00 +0000 (13:41 -0700)
commit39856def4f717a1d938b80f76d86202dd88abc10
tree6bb853eca72e031dc54597207f389ef5757d6d90
parent3e225074507540c866704f4de6b70eb0fcd37013
Remove DWARF queue-related globals

This removes some queue-related globals from the DWARF reader, in
favor of a new member on dwarf2_per_objfile.  Globals must be avoided
in this code, because they prevent multi-threading the reader.

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

* dwarf2/read.h (struct dwarf2_queue_item): Move from
dwarf2/read.c.  Remove "next" member.  Add constructor ntad
destructor.
(struct dwarf2_per_objfile) <queue>: New member.
* dwarf2/read.c (struct dwarf2_queue_item): Move to
dwarf2/read.h.
(dwarf2_queue, dwarf2_queue_tail): Remove.
(class dwarf2_queue_guard): Add parameter to constructor.  Use
DISABLE_COPY_AND_ASSIGN.
<m_per_objfile>: New member.
<~dwarf2_queue_guard>: Rewrite.
(dw2_do_instantiate_symtab, queue_comp_unit, process_queue):
Update.
(~dwarf2_queue_item): New.

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