1
2
3DEBUGINFOD-FIND(1)          General Commands Manual         DEBUGINFOD-FIND(1)
4
5
6

NAME

8       debuginfod-find - request debuginfo-related data
9
10

SYNOPSIS

12       debuginfod-find [OPTION]... debuginfo BUILDID
13       debuginfod-find [OPTION]... debuginfo PATH
14       debuginfod-find [OPTION]... executable BUILDID
15       debuginfod-find [OPTION]... executable PATH
16       debuginfod-find [OPTION]... source BUILDID /FILENAME
17       debuginfod-find [OPTION]... source PATH /FILENAME
18
19

DESCRIPTION

21       debuginfod-find  queries  one or more debuginfod servers for debuginfo-
22       related data.  In case of a match, it saves the the requested file into
23       a  local cache, prints the file name to standard output, and exits with
24       a success status of 0.  In case of any error, it exits with  a  failure
25       status and an error message to standard error.
26
27
28       The debuginfod system uses buildids to identify debuginfo-related data.
29       These are stored as binary notes in ELF/DWARF  files,  and  are  repre‐
30       sented  as  lowercase hexadecimal.  For example, for a program /bin/ls,
31       look at the ELF note GNU_BUILD_ID:
32
33       % readelf -n /bin/ls | grep -A4 build.id
34       Note section [ 4] '.note.gnu.buildid' of 36 bytes at offset 0x340:
35       Owner          Data size  Type
36       GNU                   20  GNU_BUILD_ID
37       Build ID: 8713b9c3fb8a720137a4a08b325905c7aaf8429d
38
39       Then the hexadecimal BUILDID is simply:
40
41       8713b9c3fb8a720137a4a08b325905c7aaf8429d
42
43       In place of the hexadecimal BUILDID,  debuginfod-find  also  accepts  a
44       path  name to to an ELF binary, from which it extracts the buildid.  In
45       this case, ensure the file name has some character other than [0-9a-f].
46       Files  ambiguously  named  files  like  "deadbeef" can be passed with a
47       ./deadbeef extra path component.
48
49
50
51   debuginfo BUILDID
52       If the given buildid is known to a server, this request will result  in
53       a  binary  object that contains the customary .*debug_* sections.  This
54       may be a split debuginfo file as created by strip,  or  it  may  be  an
55       original unstripped executable.
56
57
58   executable BUILDID
59       If  the  given buildid is known to the server, this request will result
60       in a binary object that contains the normal executable segments.   This
61       may  be  a  executable  stripped by strip, or it may be an original un‐
62       stripped executable.  ET_DYN shared libraries are considered  to  be  a
63       type of executable.
64
65
66   source BUILDID /SOURCE/FILE
67       If  the  given buildid is known to the server, this request will result
68       in a binary object that contains the source file mentioned.   The  path
69       should  be  absolute.  Relative path names commonly appear in the DWARF
70       file's source directory, but these paths  are  relative  to  individual
71       compilation unit AT_comp_dir paths, and yet an executable is made up of
72       multiple CUs.  Therefore, to disambiguate,  debuginfod  expects  source
73       queries  to prefix relative path names with the CU compilation-directo‐
74       ry, followed by a mandatory "/".
75
76       Note: for software packaged by distributions, the CU compilation-direc‐
77       tory  may  not  be  obvious.  It can be found by inspecting AT_comp_dir
78       values in downloaded debuginfo.  For example, the comp_dir of the Fedo‐
79       ra 37 version of /bin/ls can be found as follows:
80
81       % debuginfod-find debuginfo /bin/ls
82       ~/.cache/debuginfod_client/03529d48345409576cd5c82a56ad08555088d353/
83       % eu-readelf -w ~/.cache/debuginfod_client/03529d48345409576cd5c82a56ad08555088d353/debuginfo | grep comp_dir
84                  comp_dir             (line_strp) "/usr/src/debug/coreutils-9.1-6.fc37.x86_64/separate"
85
86       Note:  the  caller  may  or  may not elide ../ or /./ or extraneous ///
87       sorts of path components in the directory  names.   debuginfod  accepts
88       both  forms.  Specifically, debuginfod canonicalizes path names accord‐
89       ing to RFC3986 section 5.2.4 (Remove Dot Segments), plus  reducing  any
90       // to / in the path.
91
92       For example:
93
94       #include <stdio.h>               source BUILDID /usr/include/stdio.h
95       /path/to/foo.c                   source BUILDID /path/to/foo.c
96       ../bar/foo.c AT_comp_dir=/zoo/   source BUILDID /zoo//../bar/foo.c
97
98

OPTIONS

100       -v     Increase   verbosity,   including  printing  frequent  download-
101              progress messages and printing the http  response  headers  from
102              the server.
103
104
105

SECURITY

107       debuginfod-find  does not include any particular security features.  It
108       trusts that the binaries returned by the  debuginfod(s)  are  accurate.
109       Therefore,  the  list  of servers should include only trustworthy ones.
110       If accessed across HTTP rather than HTTPS, the network should be trust‐
111       worthy.   Authentication  information  through the internal libcurl li‐
112       brary  is  not  currently  enabled,  except  for  the  basic  plaintext
113       http[s]://userid:password@hostname/ style.  (The debuginfod server does
114       not perform authentication, but a front-end proxy server could.)
115
116
117
118

ENVIRONMENT VARIABLES

120       $TMPDIR
121              This environment variable points to a file system to be used for
122              temporary files.  The default is /tmp.
123
124
125       $DEBUGINFOD_URLS
126              This  environment  variable  contains a list of URL prefixes for
127              trusted debuginfod instances.  Alternate URL prefixes are  sepa‐
128              rated  by  space.   This  environment  variable  may  be  set by
129              /etc/profile.d scripts reading /etc/debuginfod/*.urls files.
130
131
132       $DEBUGINFOD_CACHE_PATH
133              This environment variable governs  the  location  of  the  cache
134              where  downloaded  files  and cache-control files are kept.  The
135              default directory is chosen based  on  other  environment  vari‐
136              ables, see below.
137
138
139       $DEBUGINFOD_PROGRESS
140              This environment variable governs the default progress function.
141              If set, and if a progressfn is not explicitly set, then the  li‐
142              brary  will  configure a default progressfn.  This function will
143              append a simple progress message periodically  to  stderr.   The
144              default is no progress function output.
145
146
147       $DEBUGINFOD_VERBOSE
148              This  environment  variable  governs the default file descriptor
149              for verbose output.  If set, and if a verbose fd is not  explic‐
150              itly   set,   then  the  verbose  output  will  be  produced  on
151              STDERR_FILENO.
152
153
154       $DEBUGINFOD_RETRY_LIMIT
155              This environment variable governs the default limit of retry at‐
156              tempts.  If  a  query  failed with errno other than ENOENT, will
157              initiate several attempts within the limit.
158
159
160       $DEBUGINFOD_TIMEOUT
161              This environment variable governs the download commencing  time‐
162              out for each debuginfod HTTP connection.  A server that fails to
163              provide at least 100K  of  data  within  this  many  seconds  is
164              skipped. The default is 90 seconds.  (Zero or negative means "no
165              timeout".)
166
167
168       $DEBUGINFOD_MAXTIME
169              This environment variable dictates how long the client will wait
170              to complete the download a file found on a server in seconds. It
171              is best used to ensure that a file is downloaded quickly  or  be
172              rejected. The default is 0 (infinite time).
173
174
175       $DEBUGINFOD_MAXSIZE
176              This environment variable dictates the maximum size of a file to
177              download in bytes. This is best used if the user would  like  to
178              ensure  only  small files are downloaded. A value of 0 causes no
179              consideration for size, and the client may attempt to download a
180              file of any size.  The default is 0 (infinite size).
181
182
183       $DEBUGINFOD_HEADERS_FILE
184              This environment variable points to a file that supplies headers
185              to outbound HTTP  requests,  one  per  line.  The  header  lines
186              shouldn't  end  with CRLF, unless that's the system newline con‐
187              vention. Whitespace-only lines are skipped.
188
189

CACHE

191       Before each query, the debuginfod client library checks for a  need  to
192       clean  the  cache.   If  it's  time to clean, the library traverses the
193       cache directory and removes downloaded debuginfo-related artifacts  and
194       newly empty directories, if they have not been accessed recently.
195
196       Control  files  are  located  directly under the cache directory.  They
197       contain simple decimal numbers to set cache-related  configuration  pa‐
198       rameters.   If  the  files do not exist, the client library creates the
199       files with the default parameter values as content.
200
201       After each query, the debuginfod client library deposits newly received
202       files  into  a directory & file that is named based on the build-id.  A
203       failed query is also cached by a special file.  The  naming  convention
204       used for these artifacts is deliberately undocumented.
205
206
207       $XDG_CACHE_HOME/debuginfod_client/
208              Default cache directory, if $XDG_CACHE_HOME is set.
209
210
211       $HOME/.cache/debuginfod_client/
212              Default cache directory, if $XDG_CACHE_HOME is not set.
213
214
215       $HOME/.debuginfod_client_cache/
216              Deprecated cache directory, used only if preexisting.
217
218
219       cache_clean_interval_s
220              This  control  file  gives  the  interval between cache cleaning
221              rounds, in seconds.  The default is 86400,  one  day.   0  means
222              "immediately".
223
224
225       max_unused_age_s
226              This  control  file  sets  how long unaccessed debuginfo-related
227              files are retained, in seconds.   The  default  is  604800,  one
228              week.  0 means "immediately".
229
230
231       cache_miss_s
232              This  control file sets how long to remember a query failure, in
233              seconds.  New queries for the same artifacts  within  this  time
234              window  are  short-circuited (returning an immediate failure in‐
235              stead of sending a new  query  to  servers).   This  accelerates
236              queries  that probably would still fail.  The default is 600, 10
237              minutes.  0 means "forget immediately".
238
239

SEE ALSO

241       debuginfod(8) debuginfod_find_debuginfod(3)
242
243
244
245                                                            DEBUGINFOD-FIND(1)
Impressum