From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tromey@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2] Capture warnings when writing to the index cache
Date: Mon, 8 Apr 2024 00:23:05 -0400 [thread overview]
Message-ID: <b0848316-be99-4907-9a29-f2f918f5d9de@simark.ca> (raw)
In-Reply-To: <87zfulat8g.fsf@tromey.com>
On 2024-03-26 11:49, Tom Tromey wrote:
>>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:
>
> Tom> PR symtab/30837 points out a race that can occur when writing to the
> Tom> index cache: a call to ada_encode can cause a warning, which is
> Tom> forbidden on a worker thread.
>
> Tom> This patch fixes the problem by arranging to capture any such
> Tom> warnings.
>
> Tom> This is v2 of the patch. It is rebased on top of some other changes
> Tom> in the same area. v1 was here:
>
> Tom> https://sourceware.org/pipermail/gdb-patches/2024-February/206595.html
>
> Tom> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30837
>
> I'm checking this in now.
>
> Tom
Not sure if this has been reported already, but when I build for
--host=x86_64-w64-mingw32, I get:
CXX gdb.o
In file included from /home/simark/src/binutils-gdb/gdb/defs.h:620,
from <command-line>:
/home/simark/src/binutils-gdb/gdb/utils.h:378:56: error: ignoring attributes on template argument ‘void(const char*, va_list)’ {aka ‘void(const char*, char*)’} [-Werror=ignored-attributes]
378 | typedef gdb::function_view<void (const char *, va_list)> warning_hook_handler;
| ^
I'm guessing that the problem is some attributes on va_list, on
mingw-w64? I wouldn't know how to find that.
With that issue and the other one that broke the clang build, using that
function signature in a function view seems pretty fragile. It would
perhaps be simpler for `warning_hook_handler` to be an abstract base
class with one virtual method (with the same signature as the current
warning_hook_handler). That method could have whatever attribute it
needs, it wouldn't be a problem.
Simon
next prev parent reply other threads:[~2024-04-08 4:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-12 14:40 Tom Tromey
2024-03-26 15:49 ` Tom Tromey
2024-03-27 3:08 ` Simon Marchi
2024-03-27 13:25 ` Tom Tromey
2024-03-27 14:39 ` Simon Marchi
2024-04-08 4:23 ` Simon Marchi [this message]
2024-04-08 12:59 ` Tom Tromey
2024-04-09 1:33 ` Simon Marchi
2024-04-09 15:20 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b0848316-be99-4907-9a29-f2f918f5d9de@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=tromey@adacore.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox