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: the caller may or may not elide ../  or  /./  or  extraneous  ///
77       sorts  of  path  components in the directory names.  debuginfod accepts
78       both forms.  Specifically, debuginfod canonicalizes path names  accord‐
79       ing  to  RFC3986 section 5.2.4 (Remove Dot Segments), plus reducing any
80       // to / in the path.
81
82       For example:
83
84       #include <stdio.h>               source BUILDID /usr/include/stdio.h
85       /path/to/foo.c                   source BUILDID /path/to/foo.c
86       ../bar/foo.c AT_comp_dir=/zoo/   source BUILDID /zoo//../bar/foo.c
87
88

OPTIONS

90       -v     Increase  verbosity,  including  printing   frequent   download-
91              progress  messages  and  printing the http response headers from
92              the server.
93
94
95

SECURITY

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

ENVIRONMENT VARIABLES

110       $TMPDIR
111              This environment variable points to a file system to be used for
112              temporary files.  The default is /tmp.
113
114
115       $DEBUGINFOD_URLS
116              This environment variable contains a list of  URL  prefixes  for
117              trusted  debuginfod instances.  Alternate URL prefixes are sepa‐
118              rated by space.  Avoid referential loops that cause a server  to
119              contact  itself,  directly  or indirectly - the results would be
120              hilarious.
121
122
123       $DEBUGINFOD_CACHE_PATH
124              This environment variable governs  the  location  of  the  cache
125              where  downloaded  files  and cache-control files are kept.  The
126              default directory is chosen based  on  other  environment  vari‐
127              ables, see below.
128
129
130       $DEBUGINFOD_PROGRESS
131              This environment variable governs the default progress function.
132              If set, and if a progressfn is not explicitly set, then the  li‐
133              brary  will  configure a default progressfn.  This function will
134              append a simple progress message periodically  to  stderr.   The
135              default is no progress function output.
136
137
138       $DEBUGINFOD_VERBOSE
139              This  environment  variable  governs the default file descriptor
140              for verbose output.  If set, and if a verbose fd is not  explic‐
141              itly   set,   then  the  verbose  output  will  be  produced  on
142              STDERR_FILENO.
143
144
145       $DEBUGINFOD_RETRY_LIMIT
146              This environment variable governs the default limit of retry at‐
147              tempts.  If  a  query  failed with errno other than ENOENT, will
148              initiate several attempts within the limit.
149
150
151       $DEBUGINFOD_TIMEOUT
152              This environment variable governs the download commencing  time‐
153              out for each debuginfod HTTP connection.  A server that fails to
154              provide at least 100K  of  data  within  this  many  seconds  is
155              skipped. The default is 90 seconds.  (Zero or negative means "no
156              timeout".)
157
158
159       $DEBUGINFOD_MAXTIME
160              This environment variable dictates how long the client will wait
161              to complete the download a file found on a server in seconds. It
162              is best used to ensure that a file is downloaded quickly  or  be
163              rejected. The default is 0 (infinite time).
164
165
166       $DEBUGINFOD_MAXSIZE
167              This environment variable dictates the maximum size of a file to
168              download in bytes. This is best used if the user would  like  to
169              ensure  only  small files are downloaded. A value of 0 causes no
170              consideration for size, and the client may attempt to download a
171              file of any size.  The default is 0 (infinite size).
172
173

CACHE

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

SEE ALSO

225       debuginfod(8) debuginfod_find_debuginfod(3)
226
227
228
229                                                            DEBUGINFOD-FIND(1)
Impressum