From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 992BC3858406; Thu, 22 Sep 2022 00:16:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 992BC3858406 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1663805786; bh=Qc7F9QuKqi5bhHVVjR+ywd7DOXL2aiyNaPEeM0DvzL0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=M/6sTPR5anlMDCsFtUGrC8xPsIWt9Dm8YSHyaC1FilHSKRmuozlLn2sIRoQOU+yQJ EcpCndF4AwNIQCbktOXQa4K0a4DQ/zhdB4EnkF6t3bKvPM6atVcuUh+IzUJI/gwis9 F4s2DAs09Cr2oNaA1ptCQsyIDu0jOVzLddInV5tE= From: "amerey at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug cli/29582] Usability improvement: CTRL+C when debugindod client is downloading a file Date: Thu, 22 Sep 2022 00:16:15 +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: amerey at redhat dot com 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: cc 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 Aaron Merey changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amerey at redhat dot com --- Comment #5 from Aaron Merey --- (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 tot= al) > 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 sessio= n? > ")); >=20 > + if (resp) > + { > + gdb_printf (_("Debuginfod has been disabled.\n")); > + debuginfod_enabled =3D debuginfod_off; > + } > return 1; > } As long as debuginfod remains enabled gdb will query the user every time th= ey 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 hav= ing to answer the query each time. 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. --=20 You are receiving this mail because: You are on the CC list for the bug.=