]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/dwarf2/cooked-index.c
Capture warnings when writing to the index cache
authorTom Tromey <tromey@adacore.com>
Tue, 13 Feb 2024 20:55:34 +0000 (13:55 -0700)
committerTom Tromey <tromey@adacore.com>
Tue, 26 Mar 2024 15:49:43 +0000 (09:49 -0600)
commit818ef5f4137aaff3afdb52f8bbd3a4c3a9ffa28b
treed8b0fc9c3439c0945745e167529ced14efcb735d
parentbb9a951fab7a30cc1209c6b8b1716c13456e8b1a
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
gdb/dwarf2/cooked-index.c
gdb/dwarf2/cooked-index.h
gdb/dwarf2/read-debug-names.c
gdb/dwarf2/read.c
gdb/utils.h