aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2/read.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2024-02-13 13:55:34 -0700
committerTom Tromey <tromey@adacore.com>2024-03-26 09:49:43 -0600
commit818ef5f4137aaff3afdb52f8bbd3a4c3a9ffa28b (patch)
treed8b0fc9c3439c0945745e167529ced14efcb735d /gdb/dwarf2/read.c
parentbb9a951fab7a30cc1209c6b8b1716c13456e8b1a (diff)
downloadbinutils-818ef5f4137aaff3afdb52f8bbd3a4c3a9ffa28b.zip
binutils-818ef5f4137aaff3afdb52f8bbd3a4c3a9ffa28b.tar.gz
binutils-818ef5f4137aaff3afdb52f8bbd3a4c3a9ffa28b.tar.bz2
Capture warnings when writing to the index cache
PR symtab/30837 points out a race that can occur when writing to the index cache: a call to ada_encode can cause a warning, which is forbidden on a worker thread. This patch fixes the problem by arranging to capture any such warnings. This is v2 of the patch. It is rebased on top of some other changes in the same area. v1 was here: https://sourceware.org/pipermail/gdb-patches/2024-February/206595.html Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30837
Diffstat (limited to 'gdb/dwarf2/read.c')
-rw-r--r--gdb/dwarf2/read.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 7442094..a747922 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -4924,7 +4924,7 @@ cooked_index_debug_info::done_reading ()
cooked_index *table
= (gdb::checked_static_cast<cooked_index *>
(per_bfd->index_table.get ()));
- table->set_contents (std::move (indexes));
+ table->set_contents (std::move (indexes), &m_warnings);
}
void