1 .\" Copyright (c) 2009,2010 Joseph Koshy <jkoshy@users.sourceforge.net>
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer
9 .\" in this position and unchanged.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
15 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 .\" $Id: addr2line.1 3195 2015-05-12 17:22:19Z emaste $
32 .Nd translate program addresses to source file names and line numbers
35 .Op Fl b Ar target | Fl -target Ns = Ns Ar target
36 .Op Fl e Ar pathname | Fl -exe Ns = Ns Ar pathname
37 .Op Fl f | Fl -functions
38 .Op Fl j Ar sectionname | Fl -section Ns = Ns Ar sectionname
39 .Op Fl s | Fl -basename
40 .Op Fl C | Fl -demangle
42 .Op Fl V | Fl -version
43 .Op Ar hexaddress Ns ...
47 utility translates program addresses specified by the command line
50 to their corresponding source file names and line numbers.
51 If no arguments are given to
53 it will read these addresses from standard input.
55 Program addresses specified by arguments
57 are encoded using the conventions accepted by
62 will use the executable
66 option may be used to specified a different ELF object.
70 utility recognizes the following options:
71 .Bl -tag -width indent
72 .It Fl b Ar target | Fl -target Ns = Ns Ar target
73 This option is recognized by
76 It is supported for compatibility with GNU binutils.
77 .It Fl e Ar pathname | Fl -exe Ns = Ns Ar pathname
78 Use the ELF object specified by argument
80 to translate addresses.
81 If this option is not specified,
85 .It Fl f | Fl -functions
86 Display function names in addition to file and line number information.
87 .It Fl j Ar sectionname | Fl -section Ns = Ns Ar sectionname
88 The values specified by arguments
90 are to be treated as offsets into the section named
93 Display only the base name for each file name.
94 .It Fl C | Fl -demangle
98 .It Fl V | Fl -version
99 Print a version identifier and exit.
104 option was not specified,
106 will print the file name and line number for each address specified
111 option was specified,
113 will print a line containing the name of the function corresponding
116 followed by a line with the file name and line number.
120 utility prints the file name and line number using the format
121 .Dq FILENAME:LINENUMBER .
123 If a file or function name could not be determined,
125 will print a question mark in their place.
126 If the line number could not be determined,
128 will print a zero in its place.
130 To map address 080483c4 in the default executable
132 to a source file name and line number use:
133 .D1 "% addr2line 080483c4"
135 To map address 080483c4 in executable
138 .D1 "% addr2line -e helloworld 080483c4"
142 act as a filter reading addresses from its standard input use:
145 To print the function name corresponding to an address in addition to
146 its source file and line number use:
147 .D1 "% addr2line -f 080483c4"
158 utility was written by
159 .An Kai Wang Aq Mt kaiwang27@users.sourceforge.net .