public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: "Frank Ch. Eigler" <fche@redhat.com>, elfutils-devel@sourceware.org
Subject: Re: patch PR25722: /path/name based debuginfod-find & API lookups
Date: Fri, 27 Mar 2020 15:44:59 +0100	[thread overview]
Message-ID: <41210680ae8394d22ec7f56013fccf96dce20db6.camel@klomp.org> (raw)
In-Reply-To: <20200326013928.GB8051@redhat.com>

Hi Frank,

On Wed, 2020-03-25 at 21:39 -0400, Frank Ch. Eigler via Elfutils-devel wrote:
> commit b27d38f7eed6d99715fd1cc8a70b0a6a2b04f0ce (HEAD -> fche/pr25722)
> Author: Frank Ch. Eigler <fche@redhat.com>
> Date:   Wed Mar 25 21:36:51 2020 -0400
> 
>     PR25722: debuginfod client api: accept /path/names in place of buildid hex
>     
>     As a convenience, this extends the debuginfod find functions (and thus
>     debuginfod-find) to accept a /path/name to an ELF binary as an
>     alternative to a hexadecimal string for buildid.  Doc & testing incl.

I like the functionality for debuginfod-find, but think it is not
really appropriate for the debuginfod client API. It is a little hacky.
The user code has to know that it has to call elf_version () first. The
interface using path names is somewhat awkward since users probably
already have an file descriptor or ELF handle open for the file. It
adds a dependency on libelf and libdw for two convenience function
calls that the user could do themselves. And it only handles the main
build-id in the file, e.g. you cannot easily use it for fetching the
multi/alt-file.

I think we should move the functionality as is just into debuginfo-find 
and experiment a bit with it before adding it as a public API to the
debuginfod-client API.

In debuginfod-find the code would also be slightly simpler since it
doesn't have to convert to a hex-string first, it can just pass the
build-id bytes as is.

Cheers,

Mark

  reply	other threads:[~2020-03-27 14:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-26  1:39 Frank Ch. Eigler
2020-03-27 14:44 ` Mark Wielaard [this message]
2020-03-28  0:52   ` Frank Ch. Eigler
2020-03-29 23:11     ` Mark Wielaard

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=41210680ae8394d22ec7f56013fccf96dce20db6.camel@klomp.org \
    --to=mark@klomp.org \
    --cc=elfutils-devel@sourceware.org \
    --cc=fche@redhat.com \
    /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).