summaryrefslogtreecommitdiff
path: root/debuginfod/debuginfod-find.c
Commit message (Collapse)AuthorAgeFilesLines
* debuginfod-client: Add debuginfod_set_verbose_fd and DEBUGINFOD_VERBOSEMark Wielaard2020-11-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new function debuginfod_set_verbose_fd which will produce verbose output on a given file descriptor (STDERR_FILENO if the environment variable DEBUGINFOD_VERBOSE is set) showing how the search for a particular client query is going. Example output: debuginfod_find_debuginfo 1234567890 server urls "https://debuginfod.elfutils.org/ http://dbgd.usersys.com:3632/" checking build-id checking cache dir /home/mark/.cache/debuginfod_client using timeout 90 init server 0 https://debuginfod.elfutils.org/ url 0 https://debuginfod.elfutils.org/buildid/1234567890/debuginfo init server 1 http://dbgd.usersys.com:3632/ url 1 http://dbgd.usersys.com:3632/buildid/1234567890/debuginfo query 2 urls in parallel server response HTTP response code said error url 0 The requested URL returned error: 404 Not Found server response HTTP response code said error url 1 The requested URL returned error: 404 Not Found not found No such file or directory (err=-2) Signed-off-by: Mark Wielaard <mark@klomp.org>
* debuginfod-find: Be a bit less verbose with -vMark Wielaard2020-11-171-1/+23
| | | | | | | | | debuginfod-find -v enables a progressfn that prints the Progress every time the callback is called. For slow transfers or big downloads this can be really verbose (hundreds a times a second). Slow it down a bit, so it only prints the progress at most 5 times a second. Signed-off-by: Mark Wielaard <mark@klomp.org>
* debuginfod-find.c: Fix license block comment. File is GPLv3+ only.Mark Wielaard2020-09-161-3/+3
| | | | | | | The license itself was correct, just the comment to get a copy of the LGPL was wrong. Signed-off-by: Mark Wielaard <mark@klomp.org>
* debuginfod-find: Support compressed (kernel) ELF images.Mark Wielaard2020-09-151-2/+3
| | | | | | | | | By using dwelf_elf_begin instead of elf_begin we automatically get support for determining the build-id of compressed (kernel) images. https://sourceware.org/bugzilla/show_bug.cgi?id=26599 Signed-off-by: Mark Wielaard <mark@klomp.org>
* PR25722: debuginfod-find: accept /path/names in place of buildid hexFrank Ch. Eigler2020-03-271-6/+63
| | | | | | | | | Extend the debuginfod-find command line interface to permit /file/names instead of only buildid hexadecimal strings. v2: move code into debuginfod-find; client API remains buildid only. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* debuginfod-find: Correct error check for -v source comboFrank Ch. Eigler2020-03-241-2/+2
| | | | | | | Hardcoding argv[2] is wrong in presence of -v option. Code immediately following did the correct argv[] indexing already. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* debuginfod client API: add get_url functionFrank Ch. Eigler2020-03-221-1/+10
| | | | | | | This function lets a client know, during or after a progressfn callback, what the url of the winning outgoing download is/was. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* debuginfod client API: add get/set user_data functionsFrank Ch. Eigler2020-03-221-2/+5
| | | | | | | | Add a pair of functions to associate a void* parameter with a client object. Requested by GDB team as a way to pass file names and such user-interface data through to a progressfn callback. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* debuginfod: add client contextMark Wielaard2019-11-231-7/+22
| | | | | | | | | | Add a mandatory debuginfod_begin()/_end() call pair to manage a client object that represents persistent but non-global state. From libdwfl, dlopen the debuginfod.so client library early on. This hopefully makes sure that the code (and the libcurl.so dependency) is loaded before the program goes into multi-threaded mode. Signed-off-by: Mark Wielaard <mark@klomp.org>
* debuginfod 3/3: client interruptabilityFrank Ch. Eigler2019-11-221-2/+31
| | | | | | | | For interactive clients such as gdb, interruptibility is important for usability during longer downloads. This patchset adds a download-progress callback function to the debuginfod client library, with which a caller app can interrupt a download as well as be notified of its quantitative progress.
* debuginfod 1/2: client sideAaron Merey2019-11-221-0/+101
Introduce the debuginfod/ subdirectory, containing the client for a new debuginfo-over-http service, in shared-library and command-line forms. Two functions in libdwfl make calls into the client library to fetch elf/dwarf files by buildid, as a fallback. Instead of normal dynamic linking (thus pulling in a variety of curl dependencies), the libdwfl hooks use dlopen/dlsym. Server & tests coming in patch 2. Signed-off-by: Aaron Merey <amerey@redhat.com> Signed-off-by: Frank Ch. Eigler <fche@redhat.com>