summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2020-11-11 00:23:08 +0100
committerMark Wielaard <mark@klomp.org>2020-11-23 16:58:36 +0100
commit609053a588a3857bb74a342c8468db77c3af88d4 (patch)
tree030ebe71f78690321a88c90afded6873d070e790 /doc
parent371a4f814875ff47c75a76ec57a7a9098f5ab512 (diff)
downloadelfutils-609053a588a3857bb74a342c8468db77c3af88d4.tar.gz
debuginfod-client: Add debuginfod_set_verbose_fd and DEBUGINFOD_VERBOSE
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>
Diffstat (limited to 'doc')
-rw-r--r--doc/ChangeLog7
-rw-r--r--doc/debuginfod_find_debuginfo.317
2 files changed, 24 insertions, 0 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 8c33f174..fdf352e7 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,10 @@
+2020-11-11 Mark Wielaard <mark@klomp.org>
+
+ * debuginfod_find_debuginfo.3: Document debuginfod_set_verbose_fd
+ and DEBUGINFOD_VERBOSE.
+ * debuginfod_set_verbose_fd.3: New redirect to
+ debuginfod_find_debuginfo.3
+
2020-10-29 Frank Ch. Eigler <fche@redhat.com>
PR26775
diff --git a/doc/debuginfod_find_debuginfo.3 b/doc/debuginfod_find_debuginfo.3
index eec04e5e..3c6d52f5 100644
--- a/doc/debuginfod_find_debuginfo.3
+++ b/doc/debuginfod_find_debuginfo.3
@@ -50,6 +50,8 @@ OPTIONAL FUNCTIONS
.BI " long a, long b);"
.BI "void debuginfod_set_progressfn(debuginfod_client *" client ","
.BI " debuginfod_progressfn_t " progressfn ");"
+.BI "void debuginfod_set_verbose_fd(debuginfod_client *" client ","
+.BI " int " fd ");"
.BI "void debuginfod_set_user_data(debuginfod_client *" client ","
.BI " void *" data ");"
.BI "void* debuginfod_get_user_data(debuginfod_client *" client ");"
@@ -143,6 +145,15 @@ continue the work, or any other value to stop work as soon as
possible. Consequently, the \fBdebuginfod_find_*\fP() function will
likely return with an error, but might still succeed.
+.SS "VERBOSE OUTPUT"
+
+The \fBdebuginfod_find_*\fP() functions may use several techniques
+to retrieve the requested files, through the cache or through one
+or multiple servers or file URLs. To show how a query is handled hte
+.BR debuginfod_set_verbose_fd ()
+can be used to set a particular file descriptor on which verbose
+output is given about the query steps and eventual errors encountered.
+
.SS "USER DATA POINTER"
A single \fIvoid *\fP pointer associated with the connection handle
@@ -236,6 +247,12 @@ progress message periodically to stderr. The default is no progress
function output.
.TP 21
+.B DEBUGINFOD_VERBOSE
+This environment variable governs the default file descriptor for
+verbose output. If set, and if a verbose fd is not explicitly set,
+then the verbose output will be produced on STDERR_FILENO.
+
+.TP 21
.B DEBUGINFOD_CACHE_PATH
This environment variable governs the location of the cache where
downloaded files are kept. It is cleaned periodically as this