From: Tom Tromey <tromey@adacore.com>
To: Tom Tromey via Gdb-patches <gdb-patches@sourceware.org>
Cc: Tom Tromey <tromey@adacore.com>
Subject: Re: [PATCH] Let user C-c when waiting for DWARF index finalization
Date: Fri, 27 Jan 2023 12:22:06 -0700 [thread overview]
Message-ID: <87zga3pyu9.fsf@tromey.com> (raw)
In-Reply-To: <20221206192743.2827834-1-tromey@adacore.com> (Tom Tromey via Gdb-patches's message of "Tue, 6 Dec 2022 12:27:43 -0700")
>>>>> "Tom" == Tom Tromey via Gdb-patches <gdb-patches@sourceware.org> writes:
Tom> In PR gdb/29854, Simon pointed out that it would be good to be able to
Tom> use C-c when the DWARF cooked index is waiting for finalization. The
Tom> idea here is to be able to interrupt a command like "break" -- not to
Tom> stop the finalization process itself, which runs in a worker thread.
Tom> This patch implements this idea, by changing the index wait functions
Tom> to, by default, allow a quit. Polling is done, because there doesn't
Tom> seem to be a better way to interrupt a wait on a std::future.
I'm not totally sure what to do with this patch.
Should it go in GDB 13?
Tom> +void
Tom> +cooked_index::wait (bool allow_quit)
Tom> +{
Tom> + if (allow_quit)
Tom> + {
Tom> + using namespace std::chrono_literals;
Tom> + auto duration = 15ms;
Tom> + while (m_future.wait_for (duration) == std::future_status::timeout)
I did belatedly realize this will need an update to the gdb::future
compatibility wrapper.
I'll do a --disable-threading build before patching this.
Tom
prev parent reply other threads:[~2023-01-27 19:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-06 19:27 Tom Tromey
2022-12-06 20:35 ` Simon Marchi
2022-12-14 14:49 ` Lancelot SIX
2022-12-14 18:00 ` Tom Tromey
2023-01-27 19:22 ` Tom Tromey [this message]
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=87zga3pyu9.fsf@tromey.com \
--to=tromey@adacore.com \
--cc=gdb-patches@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).