diff options
author | Tom Tromey <tom@tromey.com> | 2021-06-27 18:44:29 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-04-12 09:31:16 -0600 |
commit | c748b24c47d2f94d2282ffa31d7484a732c18cfd (patch) | |
tree | d133c70f131e3ef0d42b3aeead5ff0d075bc3dbd /gdb/dwarf2/read.h | |
parent | da6322977928bc23b0d6a3a88af8c935fb334f3e (diff) | |
download | gdb-c748b24c47d2f94d2282ffa31d7484a732c18cfd.zip gdb-c748b24c47d2f94d2282ffa31d7484a732c18cfd.tar.gz gdb-c748b24c47d2f94d2282ffa31d7484a732c18cfd.tar.bz2 |
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.
Diffstat (limited to 'gdb/dwarf2/read.h')
-rw-r--r-- | gdb/dwarf2/read.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h index 4158a06..4ee7de9 100644 --- a/gdb/dwarf2/read.h +++ b/gdb/dwarf2/read.h @@ -368,6 +368,10 @@ struct dwarf2_per_bfd is allocated on the dwarf2_per_bfd obstack. */ signatured_type_up allocate_signatured_type (ULONGEST signature); + /* Map all the DWARF section data needed when scanning + .debug_info. */ + void map_info_sections (struct objfile *objfile); + private: /* This function is mapped across the sections and remembers the offset and size of each of the debugging sections we are |