Re: [RFC PATCH] Support debuginfo and source file fetching via debuginfo server

Aaron Merey
2019-11-01T21:03:44Z

On Fri, Nov 1, 2019 at 3:31 PM Tom Tromey <tom@tromey.com> wrote:
> Aaron> domain name resolution). However ctrl+c does not interrupt our symbol
> Aaron> downloading within GDB. This may be due to GDB's SIGINT handling,
> Aaron> which just sets a flag for the event loop when it is not safe to
> Aaron> throw an exception. Based on a comment in
> Aaron> gdb/event-top.c:handle_sigint(), symfile reading is one such region.
>
> Aaron> Also, we have an environment var $DEBUGINFOD_TIMEOUT that lets users
> Aaron> control how much time is spent attempting each download without having
> Aaron> to rely on ctrl+c.
>
> I think an environment variable may be too late. I realize gdb doesn't
> generally allow interrupting the reading of symbol tables. But, this
> case is a little different, in that the main thing happening is the
> download of the debug info. Being able to interrupt this would be good,
> because servers can wedge, download speeds can be low, etc. Also, maybe
> printing something if the download takes too long would be good to do.

Ok makes sense. One approach would be for the debuginfod_find_*
functions to temporarily install their own SIGINT handler that cancels
any downloading. Though during this time ctrl+c won't have the same
gdb-wide effect that it currently has. When this happens maybe we
could print a message to indicate that the interrupt applied
specifically to the downloading. How does this sound to you?

Aaron