Hi, Aaron - On Tue, Sep 27, 2022 at 10:10:52PM -0400, Aaron Merey via Elfutils-devel wrote:
> [...] In order to distinguish between debuginfo and executable > files with the same build-id, this function includes a bool > parameter use_debuginfo. If true, attempt to retrieve the section > from the debuginfo file with the given build-id. If false, use the > executable instead. [...] How would a client know which one to use? Does it provide power or benefit to force them to choose (or iterate?). Is there a scenario where the content could be different between the two (if both existed)? If that decisionmaking is not warranted to put upon the shoulders of the client, the server could just be asked for a section name "as if from an unstripped executable", and let it find that in the executable or debuginfo, whereever. > [...] Although this patch does not implement it, we could generate > .gdb_index on-the-fly if the target file does not contain it. > However for large debuginfo files generating the index can take a > non-trivial amount of time (ex. about 25 seconds for a 2.5GB > debuginfo file). [...] Even that is not too bad, considering that the alternative would be having to download that 2.5GB file. I recall you saying that on some distros, gdb-index sections are always there anyway, so we wouldn't have to rush to implement this feature. - FChE