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

Aaron Merey
2019-10-28T20:34:24Z

On Wed, Oct 9, 2019 at 10:55 AM Tom Tromey <tom@tromey.com> wrote:
>
> >>>>> "Christian" == Christian Biesinger via gdb-patches <gdb-patches@sourceware.org> writes:
>
> >> Debuginfo server is a lightweight web service that indexes debuginfo
> >> and source files by build-id and serves them over HTTP.
>
> Christian> You wrote that the debuginfo server will download symbols over HTTP.
> Christian> Does that mean that this call to dbgserver_find_debuginfo will block
> Christian> as it downloads the file? (will ctrl+c work as it does that?)
>
> The control-c question is a good one -- I'd also like to know the
> answer. Most things in gdb are interruptible this way.

We are now using the libcurl multi interface to fetch files over HTTP
and it is mostly non-blocking (although blocking can happen during
domain name resolution). However ctrl+c does not interrupt our symbol
downloading within GDB. This may be due to GDB's SIGINT handling,
which just sets a flag for the event loop when it is not safe to
throw an exception. Based on a comment in
gdb/event-top.c:handle_sigint(), symfile reading is one such region.

Also, we have an environment var $DEBUGINFOD_TIMEOUT that lets users
control how much time is spent attempting each download without having
to rely on ctrl+c.

Aaron