diff options
author | Tom Tromey <tromey@adacore.com> | 2024-02-13 13:55:34 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2024-03-26 09:49:43 -0600 |
commit | 818ef5f4137aaff3afdb52f8bbd3a4c3a9ffa28b (patch) | |
tree | d8b0fc9c3439c0945745e167529ced14efcb735d /gdb/dwarf2/read-debug-names.c | |
parent | bb9a951fab7a30cc1209c6b8b1716c13456e8b1a (diff) | |
download | gdb-818ef5f4137aaff3afdb52f8bbd3a4c3a9ffa28b.zip gdb-818ef5f4137aaff3afdb52f8bbd3a4c3a9ffa28b.tar.gz gdb-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-debug-names.c')
-rw-r--r-- | gdb/dwarf2/read-debug-names.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/dwarf2/read-debug-names.c b/gdb/dwarf2/read-debug-names.c index 0add804..0d60b01 100644 --- a/gdb/dwarf2/read-debug-names.c +++ b/gdb/dwarf2/read-debug-names.c @@ -352,7 +352,7 @@ cooked_index_debug_names::do_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); bfd_thread_cleanup (); } |