From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 2EF54383B6B7 for ; Tue, 6 Dec 2022 20:35:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2EF54383B6B7 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [10.0.0.11] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 6029D1E112; Tue, 6 Dec 2022 15:35:15 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1670358915; bh=kpDGvE6rgo9oQvFIe336oAOrCTDzx2MMv+5zEWsxHYU=; h=Date:Subject:To:References:From:In-Reply-To:From; b=VPW16tnDDKMdlRnL+oOLi0yaTfhhaXUPZv+IOSyHiOdnAmFhd8JiNc4pCkTeHVb8q ZSkUWpU6SYWBQ6GAoR/gvool5BRu2PzfB4mNys9NBEBEz+1pnssRxd1jnplkMlGbNM /re1b3koxUpI8RDvX7Z5hQR0l90A3fSIlqI+p1Gs= Message-ID: <7fa32516-85f5-8809-93d7-d2e95607f7e2@simark.ca> Date: Tue, 6 Dec 2022 15:35:14 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH] Let user C-c when waiting for DWARF index finalization Content-Language: en-US To: Tom Tromey , gdb-patches@sourceware.org References: <20221206192743.2827834-1-tromey@adacore.com> From: Simon Marchi In-Reply-To: <20221206192743.2827834-1-tromey@adacore.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 12/6/22 14:27, Tom Tromey via Gdb-patches wrote: > In PR gdb/29854, Simon pointed out that it would be good to be able to > use C-c when the DWARF cooked index is waiting for finalization. The > idea here is to be able to interrupt a command like "break" -- not to > stop the finalization process itself, which runs in a worker thread. > > This patch implements this idea, by changing the index wait functions > to, by default, allow a quit. Polling is done, because there doesn't > seem to be a better way to interrupt a wait on a std::future. > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29854 Thanks for doing it. It's not mandatory, but it fixes a little annoyance I hit while debugging GDB with an unoptimized GDB (the gdb.gdb/selftest.exp test). It's unfortunate that there isn't a nicer way, but this works. The patch LGTM, but since I was the one to request to the feature, we could maybe let someone else review and ack. Simon