Pre-read DWARF section data
authorTom Tromey <tom@tromey.com>
Mon, 28 Jun 2021 00:44:29 +0000 (18:44 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 12 Apr 2022 15:31:16 +0000 (09:31 -0600)
commitc748b24c47d2f94d2282ffa31d7484a732c18cfd
treed133c70f131e3ef0d42b3aeead5ff0d075bc3dbd
parentda6322977928bc23b0d6a3a88af8c935fb334f3e
Pre-read DWARF section data

Because BFD is not thread-safe, we need to be sure that any section
data that is needed is read before trying to do any DWARF indexing in
the background.

This patch takes a simple approach to this -- it pre-reads the
"info"-related sections.  This is done for the main file, but also any
auxiliary files as well, such as the DWO file.

This patch could be perhaps enhanced by removing some now-redundant
calls to dwarf2_section_info::read.
gdb/dwarf2/read.c
gdb/dwarf2/read.h