From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6E98F3857C62; Wed, 28 Sep 2022 15:09:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6E98F3857C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1664377760; bh=I93PioI+uFuGtpfopQMLz0xVCK0eIXipOTem0qZijNM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=D70awSXSqefk66pAxVjGIcL9bBEMaWq1DGcXdto/OvxStYVdBXNtDCSCt9+5Lp+fG xuDWeTN64DSN5kmEwkA1RJMXB4tiXafX36GOaABjLuorWxDkjXNO6hyaig3Hr8WifQ 5zEKbzc0h/f4hOVXQyv+45VzBUuXZBAKkJjtOpM8= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug cli/29582] Usability improvement: CTRL+C when debugindod client is downloading a file Date: Wed, 28 Sep 2022 15:09:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: cli X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29582 --- Comment #6 from Tom de Vries --- (In reply to Aaron Merey from comment #5) > (In reply to Tom de Vries from comment #2) > > diff --git a/gdb/debuginfod-support.c b/gdb/debuginfod-support.c > > index 5f04a2b38ca..69dad2b9b86 100644 > > --- a/gdb/debuginfod-support.c > > +++ b/gdb/debuginfod-support.c > > @@ -119,6 +119,12 @@ progressfn (debuginfod_client *c, long cur, long t= otal) > > gdb_printf ("Cancelling download of %s %ps...\n", > > data->desc, > > styled_string (file_name_style.style (), data->fname)= ); > > + int resp =3D nquery (_("Cancel further downloading for this sess= ion? > > ")); > >=20 > > + if (resp) > > + { > > + gdb_printf (_("Debuginfod has been disabled.\n")); > > + debuginfod_enabled =3D debuginfod_off; > > + } > > return 1; > > } >=20 > As long as debuginfod remains enabled gdb will query the user every time > they cancel a download. I think it would be preferable for gdb to remember > when the user answered "n" so that individual downloads can be cancelled > without having to answer the query each time. >=20 > Maybe we should also add a gdb command such as 'set debuginfod cancel-all > on/off' so that the behavior of ctrl-c during downloads can be set without > having to answer the query every session. 'on' could mean ctrl-c disables > debuginfod while 'off' only cancels the current download. Good points. I've come up with "set debuginfod cancel one/all/ask" to address these. --=20 You are receiving this mail because: You are on the CC list for the bug.=