[PATCH] gdb: Print debuginfod first-use notification

Keith Seitz keiths@redhat.com
Thu Jul 22 17:07:00 GMT 2021


On 5/26/21 6:27 PM, Aaron Merey via Gdb-patches wrote:
> When querying debuginfod servers for the first time, notify the user
> that GDB may automatically download debuginfo.  Helps ensure users are
> aware that GDB may be relying on the correct operation of remote
> debuginfod servers.
> 
> In order to determine whether debuginfod is being queried for the
> first time, check for the presence of a local debuginfod cache.
> If one cannot be found, the notification will be displayed before
> performing the first query.

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.

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?
Keith



More information about the Gdb-patches mailing list