public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: "Frank Ch. Eigler" <fche@redhat.com>
To: Milian Wolff <mail@milianw.de>
Cc: elfutils-devel@sourceware.org
Subject: Re: Expanding control over debuginfod usage from dwfl [was: Re: Questions regarding debuginfod.h API]
Date: Wed, 6 Jul 2022 14:40:09 -0400	[thread overview]
Message-ID: <20220706184009.GD9702@redhat.com> (raw)
In-Reply-To: <5959578.lOV4Wx5bFT@agathemoarbauer>

Hi -

> > Thus my proposal, and RFC:
> > 
> > ```
> > /* Let us mirror the debuginfod progressfn for dwfl and forward it to
> >    the internal debuginfod client, if available.
> >    This way, dwfl's usage of debuginfod can stay optional and we would not
> >    need to link to debuginfod directly from code using dwfl.
> >  */
> > typedef int (*dwfl_debuginfod_progressfn_t)(Dwfl *dwfl, long a, long b);
> > extern void dwfl_set_debuginfod_progressfn(Dwfl *dwfl,
> > 			           dwfl_debuginfod_progressfn_t fn);
> > ```

(Don't quite see how this extension would let you disable or enable
debuginfod support on a given dwfl.  By the time a progressfn is
called, some debuginfod traffic would be attempted.)n


> Alternately:
> [...]
> > /* We could just give full access to the internal client
> >    but doing so may clash with future usages of e.g.
> >    debuginfod_{set,get}_user_data in dwfl and users of dwfl.
> >    Otherwise, this is obviously easiest and gives most flexibility.
> >    We just need to forward get_client from debuginfod-client.c
> >  */
> > extern debuginfod_client *dwfl_debuginfod_client (Dwfl *);
> > ```
> > What do you all think?

In order to -influence- things, would you not need to -change- the
client somehow?  We don't have debuginfod-client apis to disable or
reconfigure any particular client object.  Such an API wouldn't let
you replace it with a hook object of your own either.


So, dunno, could you perhaps remind us what your current usage
interests are?

To enable/disable it on a per-dwfl basis?  If yes, and if statically,
maybe a new Dwfl_Callbacks option for .find_debuginfo() could be your
ticket: a dwfl_standard_find_debuginfo variant sans debuginfod at the
end.


- FChE


  reply	other threads:[~2022-07-06 18:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-08 12:44 Questions regarding debuginfod.h API Milian Wolff
2022-04-08 13:44 ` Frank Ch. Eigler
2022-04-08 19:09   ` Milian Wolff
2022-04-08 19:44     ` Frank Ch. Eigler
2022-04-08 19:50       ` Milian Wolff
2022-04-09 13:44         ` Expanding control over debuginfod usage from dwfl [was: Re: Questions regarding debuginfod.h API] Milian Wolff
2022-07-06 18:28           ` Milian Wolff
2022-07-06 18:40             ` Frank Ch. Eigler [this message]
2022-07-06 19:37               ` Milian Wolff
2022-07-06 19:41                 ` Frank Ch. Eigler
2022-07-06 19:44                   ` Milian Wolff
2022-07-06 19:54                     ` Frank Ch. Eigler
2022-04-16 15:03         ` Questions regarding debuginfod.h API Frank Ch. Eigler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220706184009.GD9702@redhat.com \
    --to=fche@redhat.com \
    --cc=elfutils-devel@sourceware.org \
    --cc=mail@milianw.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).