This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH RFC] Add debuginfod support to objdump and readelf
Hi Aaron,
> Since there does not appear to be a
> straightforward way to get a build-id from Filedata, readelf's
> get_build_id iterates through the file's ELF notes searching for
> NT_GNU_BUILD_ID. The code borrows a lot from process_notes_at,
> including separate handling of IA-64 files. Should this separate
> handling for IA-64 remain or does it just result in clutter?
Yes. Best to be safe in this area I think.
> One feature of the debuginfod client library is the ability to attach
> a user-defined progress update function to a query that prints
> information during a download such as the size of the file being
> downloaded or the completion percentage of the download. This patch
> does not make use of this feature. Should it be added?
As an extra option yes. I think that the default should be to not
display anything though.
> Any other comments or suggestions are appreciated.
It would helpful if you could include updates to the binutils/NEWS
and binutils/doc/binutils.texi files as well. It would also be
really nice if you could create some new entries in the binutils
testsuite to check the feature, but I can see how this might be
rather hard to do.
I am slightly worried however about adding a new dependency to the
binutils, albeit one that is only needed if enabled via a configuration
option. Is the database querying code in libdebuginfod complex ?
Maybe it could be separated out into a separate library (ie not part of
elfutils) or even imported directly into the binutils sources.
(This probably is a bad idea, but I just wanted to check).
The configure check does not appear to work correctly. I tried the
following:
% mkdir /dev/shm/test
% cd /edv/shm/test
% /work/sources/binutils/current/configure --quiet --with-debuginfod --enable-gold
% make all-binutils
mkdir -p -- ./intl
Configuring in ./intl
mkdir -p -- ./binutils
Configuring in ./binutils
configure: error: debuginfod is missing or unusable
make: *** [Makefile:3566: configure-binutils] Error 1
So the configure succeeded, but the build failed. (This was on an
x86_64 box running Fedora 29).
Cheers
Nick