[PATCH] gdb: Print debuginfod first-use notification

Aaron Merey amerey@redhat.com
Thu Jul 22 18:01:22 GMT 2021


Hi Keith,

On Thu, Jul 22, 2021 at 1:07 PM Keith Seitz <keiths@redhat.com> wrote:
> I don't mean to jump into the fray so late here, but I have one request and
> one question regarding this.
>
> First, please include a copy of the proposed output in the commit log.
> It renders trivial the understanding of the intended change.

Agreed.

> This proposed change seems suboptimal for GDB. IIUC the change comes as
> a consequence of a Fedora CR proposal related to debuginfod. There,
> developers worried about usage problems when debuginfod ran into, e.g.,
> network issues. Users would have no clue why tools might be become
> "suddenly" unresponsive.
>
> While I share those concerns, I think we can do better than a simple
> warning in GDB, given that GDB is an interactive tool.
>
> Would it be more user-friendly to ask the user the first time GDB queries
> debuginfod to download debuginfo?
>
> Something like:
>
>    This GDB is configured to auto-download debuginfo from
>    https://debuginfod.elfutils.org. Continue? (y or n)
>
> Given that this query would only happen once, I don't think it would
> necessarily be that intrusive. [If it was considered too disruptive,
> we could add a setting to circumvent that query.]
>
> Opinions?

If a user responds with 'no' we could print a message recommending they
unset $DEBUGINFOD_URLS and then exit GDB. Otherwise we may have to introduce
GDB-specific ways of enabling and disabling debuginfod. Although this
could be pretty straightforward with something like a 'set debuginfod on/off'
command, I do worry that this complicates GDB's debuginfod functionality
without much payoff.

Part of the client-side appeal of debuginfod is that it is extremely simple
to enable and configure via $DEBUGINFOD_URLS. If GDB is built with
debuginfod and the user has set $DEBUGINFOD_URLS and they see the
non-interactive first use notice mentioning that debuginfod is enabled,
I think it is safe to assume that the user is sufficiently informed and
that they had ample opportunity to disable debuginfod if they wished.

Aaron



More information about the Gdb-patches mailing list