[Bug cli/29582] Usability improvement: CTRL+C when debugindod client is downloading a file

vries at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Wed Sep 28 15:09:19 GMT 2022


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

--- Comment #6 from Tom de Vries <vries at gcc dot gnu.org> ---
(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 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.

Good points.

I've come up with "set debuginfod cancel one/all/ask" to address these.

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


More information about the Gdb-prs mailing list