public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: "Frank Ch. Eigler" <fche@redhat.com>
To: Mark Wielaard <mark@klomp.org>
Cc: elfutils-devel@sourceware.org, simark@simark.ca
Subject: Re: PR25369 rfc: debuginfod client api extension for progressfn prettying etc.
Date: Tue, 25 Feb 2020 15:32:00 -0000	[thread overview]
Message-ID: <20200225153202.GB32726@redhat.com> (raw)
In-Reply-To: <2fef8c25631356b074f19f6da6795c871c24aa9f.camel@klomp.org>

Hi -

> > This latter is a bit long and should probably be abbreviated, wdyt?
> 
> Might want to abbrev the build-id part to /81..aa/. The interesting
> part is which server is used imho.

Yeah, OK.

> > +/* Add an outgoing HTTP request  "Header: Value".  Copies string.  */
> > +int debuginfod_add_http_header (debuginfod_client *client, const char* header);
> 
> This one seems different from the others and has a specific use case
> just for the debuginfod server. Are you sure it is generic enough to be
> added as a new public interface? If we add this can we do it separately
> from other debuginfo-client progress improvements?

I think it has a chance to be useful to other clients too, for example
for other proxy / authentication schemes.  And given that there is a
shared library boundary, private APIs aren't in easy reach.
"separately" as in separate commits? ... I suppose, if it really
matters.


> > +/* Return currently active URL, if known.  String owned by curl, do not free.  */
> > +const char* debuginfod_get_url (debuginfod_client *client);
> 
> This does seem useful with the comment that was already made, that
> lifetime of the returned string should be documented. I assume it is
> valid to call this after debuginfod_find_* has returned, but before
> debuginfod_end has been called?

Clarified this in a followup patch.  No, only valid during the progress
callback function itself.


> > +/* Set the user parameter.  */
> > +void debuginfod_set_user_data (debuginfod_client *client, void *value);
> > +
> > +/* Get the user parameter.  */
> > +void* debuginfod_get_user_data (debuginfod_client *client);
> 
> In theory I like these additions. But I don't really see the point of
> how they are used. Is the only use case to pass the string "Progress"?

That is for test coverage.

> If there are no real users for this then I think we should not add
> these at this time. Or is some other client using them? I am not really
> against it, but would prefer if we add them separately to keep the
> patches concise.

GDB would use them pretty much immediately, to be able to prepare a
more informative progress notification (like the file name whose
debuginfo is being sought, instead of its buildid).


- FChE

  reply	other threads:[~2020-02-25 15:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-25  3:35 Frank Ch. Eigler
2020-02-25  3:50 ` Simon Marchi
2020-02-25 15:25 ` Mark Wielaard
2020-02-25 15:32   ` Frank Ch. Eigler [this message]
2020-02-25 17:07     ` Mark Wielaard
2020-02-25 18:51       ` Frank Ch. Eigler
2020-03-20  0:31         ` PR25369 rfc slice 1: debuginfod_get/set_user_data Frank Ch. Eigler
2020-03-22 16:08           ` Mark Wielaard
2020-03-22 18:09             ` 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=20200225153202.GB32726@redhat.com \
    --to=fche@redhat.com \
    --cc=elfutils-devel@sourceware.org \
    --cc=mark@klomp.org \
    --cc=simark@simark.ca \
    /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).