Blame doc/debuginfod-find.1.debuginfod-timeout-progress

Packit 86a02d
'\"! tbl | nroff \-man
Packit 86a02d
'\" t macro stdmacro
Packit 86a02d
Packit 86a02d
.de SAMPLE
Packit 86a02d
.br
Packit 86a02d
.RS 0
Packit 86a02d
.nf
Packit 86a02d
.nh
Packit 86a02d
..
Packit 86a02d
.de ESAMPLE
Packit 86a02d
.hy
Packit 86a02d
.fi
Packit 86a02d
.RE
Packit 86a02d
..
Packit 86a02d
Packit 86a02d
.TH DEBUGINFOD-FIND 1
Packit 86a02d
.SH NAME
Packit 86a02d
debuginfod-find \- request debuginfo-related data
Packit 86a02d
Packit 86a02d
.SH SYNOPSIS
Packit 86a02d
.B debuginfod-find [\fIOPTION\fP]... debuginfo \fIBUILDID\fP
Packit 86a02d
Packit 86a02d
.B debuginfod-find [\fIOPTION\fP]... executable \fIBUILDID\fP
Packit 86a02d
Packit 86a02d
.B debuginfod-find [\fIOPTION\fP]... source \fIBUILDID\fP \fI/FILENAME\fP
Packit 86a02d
Packit 86a02d
.SH DESCRIPTION
Packit 86a02d
\fBdebuginfod-find\fP queries one or more \fBdebuginfod\fP servers for
Packit 86a02d
debuginfo-related data.  In case of a match, it saves the the
Packit 86a02d
requested file into a local cache, prints the file name to standard
Packit 86a02d
output, and exits with a success status of 0.  In case of any error,
Packit 86a02d
it exits with a failure status and an error message to standard error.
Packit 86a02d
Packit 86a02d
.\" Much of the following text is duplicated with debuginfod.8
Packit 86a02d
Packit 86a02d
The debuginfod system uses buildids to identify debuginfo-related data.
Packit 86a02d
These are stored as binary notes in ELF/DWARF files, and are
Packit 86a02d
represented as lowercase hexadecimal.  For example, for a program
Packit 86a02d
/bin/ls, look at the ELF note GNU_BUILD_ID:
Packit 86a02d
Packit 86a02d
.SAMPLE
Packit 86a02d
% readelf -n /bin/ls | grep -A4 build.id
Packit 86a02d
Note section [ 4] '.note.gnu.buildid' of 36 bytes at offset 0x340:
Packit 86a02d
Owner          Data size  Type
Packit 86a02d
GNU                   20  GNU_BUILD_ID
Packit 86a02d
Build ID: 8713b9c3fb8a720137a4a08b325905c7aaf8429d
Packit 86a02d
.ESAMPLE
Packit 86a02d
Packit 86a02d
Then the hexadecimal BUILDID is simply:
Packit 86a02d
Packit 86a02d
.SAMPLE
Packit 86a02d
8713b9c3fb8a720137a4a08b325905c7aaf8429d
Packit 86a02d
.ESAMPLE
Packit 86a02d
Packit 86a02d
.SS debuginfo \fIBUILDID\fP
Packit 86a02d
Packit 86a02d
If the given buildid is known to a server, this request will result
Packit 86a02d
in a binary object that contains the customary \fB.*debug_*\fP
Packit 86a02d
sections.  This may be a split debuginfo file as created by
Packit 86a02d
\fBstrip\fP, or it may be an original unstripped executable.
Packit 86a02d
Packit 86a02d
.SS executable \fIBUILDID\fP
Packit 86a02d
Packit 86a02d
If the given buildid is known to the server, this request will result
Packit 86a02d
in a binary object that contains the normal executable segments.  This
Packit 86a02d
may be a executable stripped by \fBstrip\fP, or it may be an original
Packit 86a02d
unstripped executable.  \fBET_DYN\fP shared libraries are considered
Packit 86a02d
to be a type of executable.
Packit 86a02d
Packit 86a02d
.SS source \fIBUILDID\fP \fI/SOURCE/FILE\fP
Packit 86a02d
Packit 86a02d
If the given buildid is known to the server, this request will result
Packit 86a02d
in a binary object that contains the source file mentioned.  The path
Packit 86a02d
should be absolute.  Relative path names commonly appear in the DWARF
Packit 86a02d
file's source directory, but these paths are relative to
Packit 86a02d
individual compilation unit AT_comp_dir paths, and yet an executable
Packit 86a02d
is made up of multiple CUs.  Therefore, to disambiguate, debuginfod
Packit 86a02d
expects source queries to prefix relative path names with the CU
Packit 86a02d
compilation-directory, followed by a mandatory "/".
Packit 86a02d
Packit 86a02d
Note: the user should not elide \fB../\fP or \fB/./\fP or extraneous
Packit 86a02d
\fB///\fP sorts of path components in the directory names, because if
Packit 86a02d
this is how those names appear in the DWARF files, that is what
Packit 86a02d
debuginfod needs to see too.
Packit 86a02d
Packit 86a02d
For example:
Packit 86a02d
.TS
Packit 86a02d
l l.
Packit 86a02d
#include <stdio.h>	source BUILDID /usr/include/stdio.h
Packit 86a02d
/path/to/foo.c	source BUILDID /path/to/foo.c
Packit 86a02d
\../bar/foo.c AT_comp_dir=/zoo/	source BUILDID /zoo//../bar/foo.c
Packit 86a02d
.TE
Packit 86a02d
Packit 86a02d
.SH "OPTIONS"
Packit 86a02d
Packit 86a02d
.TP
Packit 86a02d
.B "\-v"
Packit 86a02d
Increase verbosity, including printing frequent download-progress messages.
Packit 86a02d
Packit 86a02d
Packit 86a02d
.SH "SECURITY"
Packit 86a02d
Packit 86a02d
debuginfod-find \fBdoes not\fP include any particular security
Packit 86a02d
features.  It trusts that the binaries returned by the debuginfod(s)
Packit 86a02d
are accurate.  Therefore, the list of servers should include only
Packit 86a02d
trustworthy ones.  If accessed across HTTP rather than HTTPS, the
Packit 86a02d
network should be trustworthy.  Authentication information through
Packit 86a02d
the internal \fIlibcurl\fP library is not currently enabled, except
Packit 86a02d
for the basic plaintext \%\fIhttp[s]://userid:password@hostname/\fP style.
Packit 86a02d
(The debuginfod server does not perform authentication, but a front-end
Packit 86a02d
proxy server could.)
Packit 86a02d
Packit 86a02d
.SH "ENVIRONMENT VARIABLES"
Packit 86a02d
Packit 86a02d
.TP 21
Packit 86a02d
.B DEBUGINFOD_URLS
Packit 86a02d
This environment variable contains a list of URL prefixes for trusted
Packit 86a02d
debuginfod instances.  Alternate URL prefixes are separated by space.
Packit 86a02d
Packit 86a02d
.TP 21
Packit 86a02d
.B DEBUGINFOD_TIMEOUT
Packit 86a02d
This environment variable governs the timeout for each debuginfod HTTP
Packit 86a02d
connection.  A server that fails to respond within this many seconds
Packit 86a02d
is skipped.  The default is 5.
Packit 86a02d
Packit 86a02d
.TP 21
Packit 86a02d
.B DEBUGINFOD_CACHE_PATH
Packit 86a02d
This environment variable governs the location of the cache where
Packit 86a02d
downloaded files are kept.  It is cleaned periodically as this program
Packit 86a02d
is reexecuted.  Cache management parameters may be set by files under
Packit 86a02d
this directory: see the \fBdebuginfod_find_debuginfo(3)\fP man page
Packit 86a02d
for details.  The default is $HOME/.debuginfod_client_cache.
Packit 86a02d
Packit 86a02d
.SH "FILES"
Packit 86a02d
.LP
Packit 86a02d
.PD .1v
Packit 86a02d
.TP 20
Packit 86a02d
.B $HOME/.debuginfod_client_cache
Packit 86a02d
Default cache directory.
Packit 86a02d
.PD
Packit 86a02d
Packit 86a02d
.SH "SEE ALSO"
Packit 86a02d
.I "debuginfod(8)"
Packit 86a02d
.I "debuginfod_find_debuginfod(3)"