public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "amerey at redhat dot com" <sourceware-bugzilla@sourceware.org>
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	[thread overview]
Message-ID: <bug-29582-4717-fqOr7k9c6x@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29582-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=29582

Aaron Merey <amerey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amerey at redhat dot com

--- Comment #5 from Aaron Merey <amerey at redhat dot com> ---
(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 total)
>        gdb_printf ("Cancelling download of %s %ps...\n",
>                   data->desc,
>                   styled_string (file_name_style.style (), data->fname));
> +      int resp = nquery (_("Cancel further downloading for this session?
> "));
> 
> +      if (resp)
> +       {
> +         gdb_printf (_("Debuginfod has been disabled.\n"));
> +         debuginfod_enabled = debuginfod_off;
> +       }
>        return 1;
>      }

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.

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2022-09-22  0:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-18  8:20 [Bug cli/29582] New: " mliska at suse dot cz
2022-09-18  8:34 ` [Bug cli/29582] " vries at gcc dot gnu.org
2022-09-20 11:28 ` vries at gcc dot gnu.org
2022-09-20 13:59 ` vries at gcc dot gnu.org
2022-09-20 15:36 ` mliska at suse dot cz
2022-09-22  0:16 ` amerey at redhat dot com [this message]
2022-09-28 15:09 ` vries at gcc dot gnu.org
2022-09-28 15:09 ` vries at gcc dot gnu.org
2022-09-29  2:23 ` amerey at redhat dot com
2022-09-29  8:26 ` vries at gcc dot gnu.org
2024-01-10 17:09 ` ssbssa at sourceware dot org
2024-02-22 22:28 ` amerey at redhat dot com

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=bug-29582-4717-fqOr7k9c6x@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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).