public inbox for
 help / color / mirror / Atom feed
From: "Frank Ch. Eigler" <>
To: Mark Wielaard <>
Cc: Aaron Merey <>,
Subject: Re: [PATCH] debuginfod: Support queries for ELF/DWARF sections
Date: Wed, 26 Oct 2022 11:28:37 -0400	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Hi -

> Is/should the section name be URL-encoded?


> I would drop the maybe_debuginfo_section heuristics. There are some
> sections like .strtab/.symtab that are probably in the debug file, but
> might be in the executable. I would assume that a named section can
> normally be found in the debugfile and only use the executable as
> fallback.

That heuristic would work fine for the case of .gdb_index, that
motivated this whole piece of work.  Sure.

> Finally, if the section comes from a file in the cache or if we have to
> download it in full anyway, then extracting the section into its own
> file seems slightly wasteful. It would be great if we could just report
> back "here is the full exe/debug file which does contain the requested
> section name".  [...]

It'd be fine to pass back the extracted section content anyway, even
if the full elf and/or dwarf file is already there.  Consider
federated debuginfod servers.  Intermediate servers may be
willing/able to do this extraction on behalf of clients who really
only want the section in question.  And if they cache the result, as
in amerey's draft code, then this will also help accelerate other
future clients.  That's just the usage scenario (gdb acceleration).

> int
> debuginfod_find_section (debuginfod_client *client,
>                          const unsigned char *build_id,
>                          int build_id_len,
>                          const char *section, char **path,
>                          bool *file_is_elf)
> Maybe that is over-designed to avoid a little bit of disk waste?

(Then the client code would have to learn elfutils API internals in
order to extract the section it was actually interested in.)

- FChE

  reply	other threads:[~2022-10-26 15:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21  0:06 [PATCH v2] " Aaron Merey
2022-10-22  0:09 ` [PATCH] " Aaron Merey
2022-10-24 18:38   ` Frank Ch. Eigler
2022-10-26 14:57     ` Mark Wielaard
2022-10-26 15:28       ` Frank Ch. Eigler [this message]
2022-10-26 17:57       ` Aaron Merey
2022-10-26 15:25     ` Mark Wielaard
2022-10-26 17:55     ` Aaron Merey
  -- strict thread matches above, loose matches on Subject: below --
2022-09-28  2:10 Aaron Merey
2022-09-28 14:28 ` Frank Ch. Eigler
2022-09-28 18:20   ` Aaron Merey

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:

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

  git send-email \ \ \ \ \ \

* 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).