public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Debuginfod in an interactive gdb frontend
@ 2024-05-07  8:57 Dmitry Neverov
  2024-05-07 18:48 ` Tom Tromey
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Neverov @ 2024-05-07  8:57 UTC (permalink / raw)
  To: Dmitry Neverov via Gdb

Please suggest how to integrate with debuginfod in the interactive gdb frontend.

Since loading debug information can be slow, I'd like to ask the user
before loading, similar to what `set debuginfod enabled ask` does in
the terminal. The 'set debuginfod enabled ask' defaults to 'N' in the
non-interactive terminal. Is there any way to hook into this
interaction and make the answer depend on user choice in UI without
typing in the console?

Also since loading takes time, I'd like to show some progress in UI.
Is it possible to get notified when the debuginfo loading for a given
binary starts/finishes, and with which result?

I thought I could write a MissingDebugHandler in python and wrap
debuginfod with necessary progress, but it looks like debuginfod api
is not available in python.

--
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Debuginfod in an interactive gdb frontend
  2024-05-07  8:57 Debuginfod in an interactive gdb frontend Dmitry Neverov
@ 2024-05-07 18:48 ` Tom Tromey
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Tromey @ 2024-05-07 18:48 UTC (permalink / raw)
  To: Dmitry Neverov via Gdb; +Cc: Dmitry Neverov

>>>>> "Dmitry" == Dmitry Neverov via Gdb <gdb@sourceware.org> writes:

Dmitry> Please suggest how to integrate with debuginfod in the interactive gdb frontend.
Dmitry> Since loading debug information can be slow, I'd like to ask the user
Dmitry> before loading, similar to what `set debuginfod enabled ask` does in
Dmitry> the terminal. The 'set debuginfod enabled ask' defaults to 'N' in the
Dmitry> non-interactive terminal. Is there any way to hook into this
Dmitry> interaction and make the answer depend on user choice in UI without
Dmitry> typing in the console?

Dmitry> Also since loading takes time, I'd like to show some progress in UI.
Dmitry> Is it possible to get notified when the debuginfo loading for a given
Dmitry> binary starts/finishes, and with which result?

Dmitry> I thought I could write a MissingDebugHandler in python and wrap
Dmitry> debuginfod with necessary progress, but it looks like debuginfod api
Dmitry> is not available in python.

gdb doesn't really have a way to forward these user questions over MI
(assuming that is what you are using).

Maybe one option would be for your front end to present the choice to
the user somehow and then use this to change the gdb setting.

For progress notification -- MI does have some notion of this.  I didn't
look but I assume the debuginfod support isn't using it.  This could be
changed.

Tom

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-07 18:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-07  8:57 Debuginfod in an interactive gdb frontend Dmitry Neverov
2024-05-07 18:48 ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).