From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id nONyGBHrnWHjSgAAWB0awg (envelope-from ) for ; Wed, 24 Nov 2021 02:34:41 -0500 Received: by simark.ca (Postfix, from userid 112) id 530DC1F0CE; Wed, 24 Nov 2021 02:34:41 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C30551EDEE for ; Wed, 24 Nov 2021 02:34:40 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 16A683858423 for ; Wed, 24 Nov 2021 07:34:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 16A683858423 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1637739280; bh=9Hc4VucMLSb73ouKMGDVkK3R/xan0uCbyZTlC8RRY2U=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=oKaaFwTZPx2mhBZBCQstFMc+Y+dcid7E1Wp5MTugjfeHVu/prFOgK2y+xHPyu3MBe g8EqthF+84HGNUOc+cmvKIwOpoOQY0D+b2XsZloE38du7yhSVPM5d+QQ1lYeoD6iob /YxRh1qFBHSICYFu4JZ25PeexuobSAD924tfbMc4= Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id D3E10385840B for ; Wed, 24 Nov 2021 07:34:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D3E10385840B Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id DD85B1FD2F; Wed, 24 Nov 2021 07:34:19 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id BF60513EC4; Wed, 24 Nov 2021 07:34:19 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +OsWLfvqnWHuEwAAMHmgww (envelope-from ); Wed, 24 Nov 2021 07:34:19 +0000 Subject: Re: [PATCH] [PR gdb/27026] CTRL-C is ignored when debug info is downloaded To: Aaron Merey , gdb-patches@sourceware.org References: <20211124014314.217675-1-amerey@redhat.com> Message-ID: <4492e215-bf8e-418b-c446-9289e5540c3e@suse.de> Date: Wed, 24 Nov 2021 08:34:19 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20211124014314.217675-1-amerey@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Cc: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 11/24/21 2:43 AM, Aaron Merey wrote: > During debuginfod downloads, ctrl-c should result in the download > being cancelled and skipped. However in some cases, ctrl-c fails to > get delivered to gdb during downloading. This can result in downloads > being unskippable. > > Fix this by ensuring that target_terminal::ours is in effect for the > duration of each download. > > Co-authored-by: Tom de Vries Hi Aaron, thanks for picking this up. Please use "Tom de Vries " (as listed in gdb/MAINTAINERS). Thanks, - Tom > https://sourceware.org/bugzilla/show_bug.cgi?id=27026#c3 > --- > gdb/debuginfod-support.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/gdb/debuginfod-support.c b/gdb/debuginfod-support.c > index 2e1837da949..1f160e29714 100644 > --- a/gdb/debuginfod-support.c > +++ b/gdb/debuginfod-support.c > @@ -23,6 +23,7 @@ > #include "gdbsupport/gdb_optional.h" > #include "cli/cli-cmds.h" > #include "cli/cli-style.h" > +#include "target.h" > > /* Set/show debuginfod commands. */ > static cmd_list_element *set_debuginfod_prefix_list; > @@ -204,6 +205,13 @@ debuginfod_source_query (const unsigned char *build_id, > user_data data ("source file", srcpath); > > debuginfod_set_user_data (c, &data); > + gdb::optional term_state; > + if (target_supports_terminal_ours ()) > + { > + term_state.emplace (); > + target_terminal::ours (); > + } > + > scoped_fd fd (debuginfod_find_source (c, > build_id, > build_id_len, > @@ -242,6 +250,13 @@ debuginfod_debuginfo_query (const unsigned char *build_id, > user_data data ("separate debug info for", filename); > > debuginfod_set_user_data (c, &data); > + gdb::optional term_state; > + if (target_supports_terminal_ours ()) > + { > + term_state.emplace (); > + target_terminal::ours (); > + } > + > scoped_fd fd (debuginfod_find_debuginfo (c, build_id, build_id_len, > &dname)); > debuginfod_set_user_data (c, nullptr); >