Merge from vendor branch OPENSSH:
[dragonfly.git] / contrib / binutils / binutils / addr2line.1
1 .\" Copyright (c) 1997, 2000 Free Software Foundation
2 .\" See COPYING for conditions for redistribution
3 .TH addr2line 1 "27 March 1997" "Free Software Foundation" "GNU Development Tools"
4 .de BP
5 .sp
6 .ti \-.2i
7 \(**
8 ..
9
10 .SH NAME
11 addr2line \- convert addresses into file names and line numbers
12
13 .SH SYNOPSIS
14 .hy 0
15 .na
16 .TP
17 .B addr2line
18 .RB "[\|" "\-b\ "\c
19 .I bfdname\c
20 .RB " | " "\-\-target="\c
21 .I bfdname\c
22 \&\|]
23 .RB "[\|" \-C | \-\-demangle "\|]"
24 .RB "[\|" "\-e\ "\c
25 .I filename\c
26 .RB " | " "\-\-exe="\c
27 .I filename\c
28 \&\|]
29 .RB "[\|" \-f | \-\-functions "\|]"
30 .RB "[\|" \-s | \-\-basenames "\|]"
31 .RB "[\|" \-H | \-\-help "\|]"
32 .RB "[\|" \-V | \-\-version "\|]"
33 .RB "[\|" addr addr ...  "\|]"
34 .ad b
35 .hy 1
36 .SH DESCRIPTION
37 \c
38 .B addr2line
39 translates program addresses into file names and line numbers.  Given
40 an address and an executable, it uses the debugging information in the
41 executable to figure out which file name and line number are
42 associated with a given address.
43
44 The executable to use is specified with the
45 .B \-e
46 option.  The default is
47 .B a.out\c
48 \&.
49
50 .B addr2line
51 has two modes of operation.
52
53 In the first, hexadecimal addresses are specified on the command line,
54 and
55 .B addr2line
56 displays the file name and line number for each address.
57
58 In the second,
59 .B addr2line
60 reads hexadecimal addresses from standard input, and prints the file
61 name and line number for each address on standard output.  In this
62 mode,
63 .B addr2line
64 may be used in a pipe to convert dynamically chosen addresses.
65
66 The format of the output is FILENAME:LINENO.  The file name and line
67 number for each address is printed on a separate line.  If the
68 .B \-f
69 option is used, then each FILENAME:LINENO line is preceded by a
70 FUNCTIONNAME line which is the name of the function containing the
71 address.
72
73 If the file name or function name can not be determined,
74 .B addr2line
75 will print two question marks in their place.  If the line number can
76 not be determined,
77 .B addr2line
78 will print 0.
79
80 .SH OPTIONS
81 .TP
82 .BI "\-b " "bfdname"\c
83 .TP
84 .BI "\-\-target=" "bfdname"
85 Specify the object-code format for the object files to be
86 \c
87 .I bfdname\c
88 \&.
89
90 .TP
91 .B \-C
92 .TP
93 .B \-\-demangle
94 Decode (\fIdemangle\fP) low-level symbol names into user-level names.
95 Besides removing any initial underscore prepended by the system, this
96 makes C++ function names readable.
97
98 .TP
99 .BI "\-e " "filename"\c
100 .TP
101 .BI "\-\-exe=" "filename"
102 Specify the name of the executable for which addresses should be
103 translated.  The default file is
104 .B a.out\c
105 \&.
106
107 .TP
108 .B \-f
109 .TP
110 .B \-\-functions
111 Display function names as well as file and line number information.
112
113 .TP
114 .B \-s
115 .TP
116 .B \-\-basenames
117 Display only the base of each file name.
118
119 .SH "SEE ALSO"
120 .RB "`\|" binutils "\|'"
121 entry in 
122 .B
123 info\c
124 \&; 
125 .I
126 The GNU Binary Utilities\c
127 \&, Roland H. Pesch (October 1991).
128
129 .SH COPYING
130 Copyright (c) 1993, 94, 95, 96, 97, 98, 1999, 2000 Free Software Foundation, Inc.
131 .PP
132 This document is distributed under the terms of the GNU Free
133 Documentation License, version 1.1.  That license is described in the
134 sources for this manual page, but it is not displayed here in order to
135 make this manual more consise.  Copies of this license can also be
136 obtained from: http://www.gnu.org/copyleft/.
137
138 \"  .SH GNU Free Documentation License
139 \"    Version 1.1, March 2000
140
141 \"    Copyright (C) 2000  Free Software Foundation, Inc.
142 \"    59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
143      
144 \"    Everyone is permitted to copy and distribute verbatim
145 \"    copies of this license document, but changing it is
146 \"    not allowed.
147 \"  .PP
148 \"  0. PREAMBLE
149 \"  .PP
150 \"  The purpose of this License is to make a manual, textbook, or other
151 \"  written document "free" in the sense of freedom: to assure everyone
152 \"  the effective freedom to copy and redistribute it, with or without
153 \"  modifying it, either commercially or noncommercially.  Secondarily,
154 \"  this License preserves for the author and publisher a way to get
155 \"  credit for their work, while not being considered responsible for
156 \"  modifications made by others.
157 \"  .PP
158 \"  This License is a kind of "copyleft", which means that derivative
159 \"  works of the document must themselves be free in the same sense.  It
160 \"  complements the GNU General Public License, which is a copyleft
161 \"  license designed for free software.
162 \"  .PP
163 \"  We have designed this License in order to use it for manuals for free
164 \"  software, because free software needs free documentation: a free
165 \"  program should come with manuals providing the same freedoms that the
166 \"  software does.  But this License is not limited to software manuals;
167 \"  it can be used for any textual work, regardless of subject matter or
168 \"  whether it is published as a printed book.  We recommend this License
169 \"  principally for works whose purpose is instruction or reference.
170 \"  .PP
171 \"  1. APPLICABILITY AND DEFINITIONS
172 \"  .PP
173 \"  This License applies to any manual or other work that contains a
174 \"  notice placed by the copyright holder saying it can be distributed
175 \"  under the terms of this License.  The "Document", below, refers to any
176 \"  such manual or work.  Any member of the public is a licensee, and is
177 \"  addressed as "you".
178 \"  .PP
179 \"  A "Modified Version" of the Document means any work containing the
180 \"  Document or a portion of it, either copied verbatim, or with
181 \"  modifications and/or translated into another language.
182 \"  .PP
183 \"  A "Secondary Section" is a named appendix or a front-matter section of
184 \"  the Document that deals exclusively with the relationship of the
185 \"  publishers or authors of the Document to the Document's overall subject
186 \"  (or to related matters) and contains nothing that could fall directly
187 \"  within that overall subject.  (For example, if the Document is in part a
188 \"  textbook of mathematics, a Secondary Section may not explain any
189 \"  mathematics.)  The relationship could be a matter of historical
190 \"  connection with the subject or with related matters, or of legal,
191 \"  commercial, philosophical, ethical or political position regarding
192 \"  them.
193 \"  .PP
194 \"  The "Invariant Sections" are certain Secondary Sections whose titles
195 \"  are designated, as being those of Invariant Sections, in the notice
196 \"  that says that the Document is released under this License.
197 \"  .PP
198 \"  The "Cover Texts" are certain short passages of text that are listed,
199 \"  as Front-Cover Texts or Back-Cover Texts, in the notice that says that
200 \"  the Document is released under this License.
201 \"  .PP
202 \"  A "Transparent" copy of the Document means a machine-readable copy,
203 \"  represented in a format whose specification is available to the
204 \"  general public, whose contents can be viewed and edited directly and
205 \"  straightforwardly with generic text editors or (for images composed of
206 \"  pixels) generic paint programs or (for drawings) some widely available
207 \"  drawing editor, and that is suitable for input to text formatters or
208 \"  for automatic translation to a variety of formats suitable for input
209 \"  to text formatters.  A copy made in an otherwise Transparent file
210 \"  format whose markup has been designed to thwart or discourage
211 \"  subsequent modification by readers is not Transparent.  A copy that is
212 \"  not "Transparent" is called "Opaque".
213 \"  .PP
214 \"  Examples of suitable formats for Transparent copies include plain
215 \"  ASCII without markup, Texinfo input format, LaTeX input format, SGML
216 \"  or XML using a publicly available DTD, and standard-conforming simple
217 \"  HTML designed for human modification.  Opaque formats include
218 \"  PostScript, PDF, proprietary formats that can be read and edited only
219 \"  by proprietary word processors, SGML or XML for which the DTD and/or
220 \"  processing tools are not generally available, and the
221 \"  machine-generated HTML produced by some word processors for output
222 \"  purposes only.
223 \"  .PP
224 \"  The "Title Page" means, for a printed book, the title page itself,
225 \"  plus such following pages as are needed to hold, legibly, the material
226 \"  this License requires to appear in the title page.  For works in
227 \"  formats which do not have any title page as such, "Title Page" means
228 \"  the text near the most prominent appearance of the work's title,
229 \"  preceding the beginning of the body of the text.
230 \"  .PP
231 \"  2. VERBATIM COPYING
232 \"  .PP
233 \"  You may copy and distribute the Document in any medium, either
234 \"  commercially or noncommercially, provided that this License, the
235 \"  copyright notices, and the license notice saying this License applies
236 \"  to the Document are reproduced in all copies, and that you add no other
237 \"  conditions whatsoever to those of this License.  You may not use
238 \"  technical measures to obstruct or control the reading or further
239 \"  copying of the copies you make or distribute.  However, you may accept
240 \"  compensation in exchange for copies.  If you distribute a large enough
241 \"  number of copies you must also follow the conditions in section 3.
242 \"  .PP
243 \"  You may also lend copies, under the same conditions stated above, and
244 \"  you may publicly display copies.
245 \"  .PP
246 \"  3. COPYING IN QUANTITY
247 \"  .PP
248 \"  If you publish printed copies of the Document numbering more than 100,
249 \"  and the Document's license notice requires Cover Texts, you must enclose
250 \"  the copies in covers that carry, clearly and legibly, all these Cover
251 \"  Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
252 \"  the back cover.  Both covers must also clearly and legibly identify
253 \"  you as the publisher of these copies.  The front cover must present
254 \"  the full title with all words of the title equally prominent and
255 \"  visible.  You may add other material on the covers in addition.
256 \"  Copying with changes limited to the covers, as long as they preserve
257 \"  the title of the Document and satisfy these conditions, can be treated
258 \"  as verbatim copying in other respects.
259 \"  .PP
260 \"  If the required texts for either cover are too voluminous to fit
261 \"  legibly, you should put the first ones listed (as many as fit
262 \"  reasonably) on the actual cover, and continue the rest onto adjacent
263 \"  pages.
264 \"  .PP
265 \"  If you publish or distribute Opaque copies of the Document numbering
266 \"  more than 100, you must either include a machine-readable Transparent
267 \"  copy along with each Opaque copy, or state in or with each Opaque copy
268 \"  a publicly-accessible computer-network location containing a complete
269 \"  Transparent copy of the Document, free of added material, which the
270 \"  general network-using public has access to download anonymously at no
271 \"  charge using public-standard network protocols.  If you use the latter
272 \"  option, you must take reasonably prudent steps, when you begin
273 \"  distribution of Opaque copies in quantity, to ensure that this
274 \"  Transparent copy will remain thus accessible at the stated location
275 \"  until at least one year after the last time you distribute an Opaque
276 \"  copy (directly or through your agents or retailers) of that edition to
277 \"  the public.
278 \"  .PP
279 \"  It is requested, but not required, that you contact the authors of the
280 \"  Document well before redistributing any large number of copies, to give
281 \"  them a chance to provide you with an updated version of the Document.
282 \"  .PP
283 \"  4. MODIFICATIONS
284 \"  .PP
285 \"  You may copy and distribute a Modified Version of the Document under
286 \"  the conditions of sections 2 and 3 above, provided that you release
287 \"  the Modified Version under precisely this License, with the Modified
288 \"  Version filling the role of the Document, thus licensing distribution
289 \"  and modification of the Modified Version to whoever possesses a copy
290 \"  of it.  In addition, you must do these things in the Modified Version:
291 \"  .PP
292 \"  A. Use in the Title Page (and on the covers, if any) a title distinct
293 \"  from that of the Document, and from those of previous versions
294 \"  (which should, if there were any, be listed in the History section
295 \"  of the Document).  You may use the same title as a previous version
296 \"  if the original publisher of that version gives permission.
297 \"  .PP
298 \"  B. List on the Title Page, as authors, one or more persons or entities
299 \"  responsible for authorship of the modifications in the Modified
300 \"  Version, together with at least five of the principal authors of the
301 \"  Document (all of its principal authors, if it has less than five).
302 \"  .PP
303 \"  C. State on the Title page the name of the publisher of the
304 \"  Modified Version, as the publisher.
305 \"  .PP
306 \"  D. Preserve all the copyright notices of the Document.
307 \"  .PP
308 \"  E. Add an appropriate copyright notice for your modifications
309 \"  adjacent to the other copyright notices.
310 \"  .PP
311 \"  F. Include, immediately after the copyright notices, a license notice
312 \"  giving the public permission to use the Modified Version under the
313 \"  terms of this License, in the form shown in the Addendum below.
314 \"  Preserve in that license notice the full lists of Invariant Sections
315 \"  and required Cover Texts given in the Document's license notice.
316 \"  .PP
317 \"  H. Include an unaltered copy of this License.
318 \"  .PP
319 \"  I. Preserve the section entitled "History", and its title, and add to
320 \"  it an item stating at least the title, year, new authors, and
321 \"  publisher of the Modified Version as given on the Title Page.  If
322 \"  there is no section entitled "History" in the Document, create one
323 \"  stating the title, year, authors, and publisher of the Document as
324 \"  given on its Title Page, then add an item describing the Modified
325 \"  Version as stated in the previous sentence.
326 \"  .PP
327 \"  J. Preserve the network location, if any, given in the Document for
328 \"  public access to a Transparent copy of the Document, and likewise
329 \"  the network locations given in the Document for previous versions
330 \"  it was based on.  These may be placed in the "History" section.
331 \"  You may omit a network location for a work that was published at
332 \"  least four years before the Document itself, or if the original
333 \"  publisher of the version it refers to gives permission.
334 \"  .PP
335 \"  K. In any section entitled "Acknowledgements" or "Dedications",
336 \"  preserve the section's title, and preserve in the section all the
337 \"  substance and tone of each of the contributor acknowledgements
338 \"  and/or dedications given therein.
339 \"  .PP
340 \"  L. Preserve all the Invariant Sections of the Document,
341 \"  unaltered in their text and in their titles.  Section numbers
342 \"  or the equivalent are not considered part of the section titles.
343 \"  .PP
344 \"  M. Delete any section entitled "Endorsements".  Such a section
345 \"  may not be included in the Modified Version.
346 \"  .PP
347 \"  N. Do not retitle any existing section as "Endorsements"
348 \"  or to conflict in title with any Invariant Section.
349 \"  .PP
350 \"  If the Modified Version includes new front-matter sections or
351 \"  appendices that qualify as Secondary Sections and contain no material
352 \"  copied from the Document, you may at your option designate some or all
353 \"  of these sections as invariant.  To do this, add their titles to the
354 \"  list of Invariant Sections in the Modified Version's license notice.
355 \"  These titles must be distinct from any other section titles.
356 \"  .PP
357 \"  You may add a section entitled "Endorsements", provided it contains
358 \"  nothing but endorsements of your Modified Version by various
359 \"  parties--for example, statements of peer review or that the text has
360 \"  been approved by an organization as the authoritative definition of a
361 \"  standard.
362 \"  .PP
363 \"  You may add a passage of up to five words as a Front-Cover Text, and a
364 \"  passage of up to 25 words as a Back-Cover Text, to the end of the list
365 \"  of Cover Texts in the Modified Version.  Only one passage of
366 \"  Front-Cover Text and one of Back-Cover Text may be added by (or
367 \"  through arrangements made by) any one entity.  If the Document already
368 \"  includes a cover text for the same cover, previously added by you or
369 \"  by arrangement made by the same entity you are acting on behalf of,
370 \"  you may not add another; but you may replace the old one, on explicit
371 \"  permission from the previous publisher that added the old one.
372 \"  .PP
373 \"  The author(s) and publisher(s) of the Document do not by this License
374 \"  give permission to use their names for publicity for or to assert or
375 \"  imply endorsement of any Modified Version.
376 \"  .PP
377
378 \"  5. COMBINING DOCUMENTS
379 \"  .PP
380 \"  You may combine the Document with other documents released under this
381 \"  License, under the terms defined in section 4 above for modified
382 \"  versions, provided that you include in the combination all of the
383 \"  Invariant Sections of all of the original documents, unmodified, and
384 \"  list them all as Invariant Sections of your combined work in its
385 \"  license notice.
386 \"  .PP
387 \"  The combined work need only contain one copy of this License, and
388 \"  multiple identical Invariant Sections may be replaced with a single
389 \"  copy.  If there are multiple Invariant Sections with the same name but
390 \"  different contents, make the title of each such section unique by
391 \"  adding at the end of it, in parentheses, the name of the original
392 \"  author or publisher of that section if known, or else a unique number.
393 \"  Make the same adjustment to the section titles in the list of
394 \"  Invariant Sections in the license notice of the combined work.
395 \"  .PP
396 \"  In the combination, you must combine any sections entitled "History"
397 \"  in the various original documents, forming one section entitled
398 \"  "History"; likewise combine any sections entitled "Acknowledgements",
399 \"  and any sections entitled "Dedications".  You must delete all sections
400 \"  entitled "Endorsements."
401 \"  .PP
402
403 \"  6. COLLECTIONS OF DOCUMENTS
404 \"  .PP
405 \"  You may make a collection consisting of the Document and other documents
406 \"  released under this License, and replace the individual copies of this
407 \"  License in the various documents with a single copy that is included in
408 \"  the collection, provided that you follow the rules of this License for
409 \"  verbatim copying of each of the documents in all other respects.
410 \"  .PP
411 \"  You may extract a single document from such a collection, and distribute
412 \"  it individually under this License, provided you insert a copy of this
413 \"  License into the extracted document, and follow this License in all
414 \"  other respects regarding verbatim copying of that document.
415 \"  .PP
416
417 \"  7. AGGREGATION WITH INDEPENDENT WORKS
418 \"  .PP
419 \"  A compilation of the Document or its derivatives with other separate
420 \"  and independent documents or works, in or on a volume of a storage or
421 \"  distribution medium, does not as a whole count as a Modified Version
422 \"  of the Document, provided no compilation copyright is claimed for the
423 \"  compilation.  Such a compilation is called an "aggregate", and this
424 \"  License does not apply to the other self-contained works thus compiled
425 \"  with the Document, on account of their being thus compiled, if they
426 \"  are not themselves derivative works of the Document.
427 \"  .PP
428 \"  If the Cover Text requirement of section 3 is applicable to these
429 \"  copies of the Document, then if the Document is less than one quarter
430 \"  of the entire aggregate, the Document's Cover Texts may be placed on
431 \"  covers that surround only the Document within the aggregate.
432 \"  Otherwise they must appear on covers around the whole aggregate.
433 \"  .PP
434
435 \"  8. TRANSLATION
436 \"  .PP
437 \"  Translation is considered a kind of modification, so you may
438 \"  distribute translations of the Document under the terms of section 4.
439 \"  Replacing Invariant Sections with translations requires special
440 \"  permission from their copyright holders, but you may include
441 \"  translations of some or all Invariant Sections in addition to the
442 \"  original versions of these Invariant Sections.  You may include a
443 \"  translation of this License provided that you also include the
444 \"  original English version of this License.  In case of a disagreement
445 \"  between the translation and the original English version of this
446 \"  License, the original English version will prevail.
447 \"  .PP
448
449 \"  9. TERMINATION
450 \"  .PP
451 \"  You may not copy, modify, sublicense, or distribute the Document except
452 \"  as expressly provided for under this License.  Any other attempt to
453 \"  copy, modify, sublicense or distribute the Document is void, and will
454 \"  automatically terminate your rights under this License.  However,
455 \"  parties who have received copies, or rights, from you under this
456 \"  License will not have their licenses terminated so long as such
457 \"  parties remain in full compliance.
458 \"  .PP
459
460 \"  10. FUTURE REVISIONS OF THIS LICENSE
461 \"  .PP
462 \"  The Free Software Foundation may publish new, revised versions
463 \"  of the GNU Free Documentation License from time to time.  Such new
464 \"  versions will be similar in spirit to the present version, but may
465 \"  differ in detail to address new problems or concerns.  See
466 \"  http://www.gnu.org/copyleft/.
467 \"  .PP
468 \"  Each version of the License is given a distinguishing version number.
469 \"  If the Document specifies that a particular numbered version of this
470 \"  License "or any later version" applies to it, you have the option of
471 \"  following the terms and conditions either of that specified version or
472 \"  of any later version that has been published (not as a draft) by the
473 \"  Free Software Foundation.  If the Document does not specify a version
474 \"  number of this License, you may choose any version ever published (not
475 \"  as a draft) by the Free Software Foundation.
476 \"  .PP
477
478 \"  ADDENDUM: How to use this License for your documents
479 \"  .PP
480 \"  To use this License in a document you have written, include a copy of
481 \"  the License in the document and put the following copyright and
482 \"  license notices just after the title page:
483 \"  .PP
484 \"      Copyright (c)  YEAR  YOUR NAME.
485 \"      Permission is granted to copy, distribute and/or
486 \"      modify this document under the terms of the GNU
487 \"      Free Documentation License, Version 1.1 or any later
488 \"      version published by the Free Software Foundation;
489 \"      with the Invariant Sections being LIST THEIR TITLES,
490 \"      with the Front-Cover Texts being LIST, and with the
491 \"      Back-Cover Texts being LIST.  A copy of the license
492 \"      is included in the section entitled "GNU Free
493 \"      Documentation License".
494 \"  .PP
495 \"  If you have no Invariant Sections, write "with no Invariant Sections"
496 \"  instead of saying which ones are invariant.  If you have no
497 \"  Front-Cover Texts, write "no Front-Cover Texts" instead of
498 \"  "Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
499 \"  .PP
500 \"  If your document contains nontrivial examples of program code, we
501 \"  recommend releasing these examples in parallel under your choice of
502 \"  free software license, such as the GNU General Public License,
503 \"  to permit their use in free software.