]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - gnu/usr.bin/binutils/addr2line/addr2line.1
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / gnu / usr.bin / binutils / addr2line / addr2line.1
1 .\" $FreeBSD$
2 .\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" Set up some character translations and predefined strings.  \*(-- will
20 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
21 .\" double quote, and \*(R" will give a right double quote.  \*(C+ will
22 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
23 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
24 .\" nothing in troff, for use with C<>.
25 .tr \(*W-
26 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
27 .ie n \{\
28 .    ds -- \(*W-
29 .    ds PI pi
30 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
31 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
32 .    ds L" ""
33 .    ds R" ""
34 .    ds C` ""
35 .    ds C' ""
36 'br\}
37 .el\{\
38 .    ds -- \|\(em\|
39 .    ds PI \(*p
40 .    ds L" ``
41 .    ds R" ''
42 'br\}
43 .\"
44 .\" Escape single quotes in literal strings from groff's Unicode transform.
45 .ie \n(.g .ds Aq \(aq
46 .el       .ds Aq '
47 .\"
48 .\" If the F register is turned on, we'll generate index entries on stderr for
49 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
50 .\" entries marked with X<> in POD.  Of course, you'll have to process the
51 .\" output yourself in some meaningful fashion.
52 .ie \nF \{\
53 .    de IX
54 .    tm Index:\\$1\t\\n%\t"\\$2"
55 ..
56 .    nr % 0
57 .    rr F
58 .\}
59 .el \{\
60 .    de IX
61 ..
62 .\}
63 .\"
64 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
65 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
66 .    \" fudge factors for nroff and troff
67 .if n \{\
68 .    ds #H 0
69 .    ds #V .8m
70 .    ds #F .3m
71 .    ds #[ \f1
72 .    ds #] \fP
73 .\}
74 .if t \{\
75 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
76 .    ds #V .6m
77 .    ds #F 0
78 .    ds #[ \&
79 .    ds #] \&
80 .\}
81 .    \" simple accents for nroff and troff
82 .if n \{\
83 .    ds ' \&
84 .    ds ` \&
85 .    ds ^ \&
86 .    ds , \&
87 .    ds ~ ~
88 .    ds /
89 .\}
90 .if t \{\
91 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
92 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
93 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
94 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
95 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
96 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
97 .\}
98 .    \" troff and (daisy-wheel) nroff accents
99 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
100 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
101 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
102 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
103 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
104 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
105 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
106 .ds ae a\h'-(\w'a'u*4/10)'e
107 .ds Ae A\h'-(\w'A'u*4/10)'E
108 .    \" corrections for vroff
109 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
110 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
111 .    \" for low resolution devices (crt and lpr)
112 .if \n(.H>23 .if \n(.V>19 \
113 \{\
114 .    ds : e
115 .    ds 8 ss
116 .    ds o a
117 .    ds d- d\h'-1'\(ga
118 .    ds D- D\h'-1'\(hy
119 .    ds th \o'bp'
120 .    ds Th \o'LP'
121 .    ds ae ae
122 .    ds Ae AE
123 .\}
124 .rm #[ #] #H #V #F C
125 .\" ========================================================================
126 .\"
127 .IX Title "ADDR2LINE 1"
128 .TH ADDR2LINE 1 "2010-10-30" "binutils-2.17.50" "GNU Development Tools"
129 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
130 .\" way too many mistakes in technical documents.
131 .if n .ad l
132 .nh
133 .SH "NAME"
134 addr2line \- convert addresses into file names and line numbers
135 .SH "SYNOPSIS"
136 .IX Header "SYNOPSIS"
137 addr2line [\fB\-b\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\fR]
138           [\fB\-C\fR|\fB\-\-demangle\fR[=\fIstyle\fR]]
139           [\fB\-e\fR \fIfilename\fR|\fB\-\-exe=\fR\fIfilename\fR]
140           [\fB\-f\fR|\fB\-\-functions\fR] [\fB\-s\fR|\fB\-\-basename\fR]
141           [\fB\-i\fR|\fB\-\-inlines\fR]
142           [\fB\-j\fR|\fB\-\-section=\fR\fIname\fR]
143           [\fB\-H\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR]
144           [addr addr ...]
145 .SH "DESCRIPTION"
146 .IX Header "DESCRIPTION"
147 \&\fBaddr2line\fR translates addresses into file names and line numbers.
148 Given an address in an executable or an offset in a section of a relocatable
149 object, it uses the debugging information to figure out which file name and
150 line number are associated with it.
151 .PP
152 The executable or relocatable object to use is specified with the \fB\-e\fR
153 option.  The default is the file \fIa.out\fR.  The section in the relocatable
154 object to use is specified with the \fB\-j\fR option.
155 .PP
156 \&\fBaddr2line\fR has two modes of operation.
157 .PP
158 In the first, hexadecimal addresses are specified on the command line,
159 and \fBaddr2line\fR displays the file name and line number for each
160 address.
161 .PP
162 In the second, \fBaddr2line\fR reads hexadecimal addresses from
163 standard input, and prints the file name and line number for each
164 address on standard output.  In this mode, \fBaddr2line\fR may be used
165 in a pipe to convert dynamically chosen addresses.
166 .PP
167 The format of the output is \fB\s-1FILENAME:LINENO\s0\fR.  The file name and
168 line number for each address is printed on a separate line.  If the
169 \&\fB\-f\fR option is used, then each \fB\s-1FILENAME:LINENO\s0\fR line is
170 preceded by a \fB\s-1FUNCTIONNAME\s0\fR line which is the name of the function
171 containing the address.
172 .PP
173 If the file name or function name can not be determined,
174 \&\fBaddr2line\fR will print two question marks in their place.  If the
175 line number can not be determined, \fBaddr2line\fR will print 0.
176 .SH "OPTIONS"
177 .IX Header "OPTIONS"
178 The long and short forms of options, shown here as alternatives, are
179 equivalent.
180 .IP "\fB\-b\fR \fIbfdname\fR" 4
181 .IX Item "-b bfdname"
182 .PD 0
183 .IP "\fB\-\-target=\fR\fIbfdname\fR" 4
184 .IX Item "--target=bfdname"
185 .PD
186 Specify that the object-code format for the object files is
187 \&\fIbfdname\fR.
188 .IP "\fB\-C\fR" 4
189 .IX Item "-C"
190 .PD 0
191 .IP "\fB\-\-demangle[=\fR\fIstyle\fR\fB]\fR" 4
192 .IX Item "--demangle[=style]"
193 .PD
194 Decode (\fIdemangle\fR) low-level symbol names into user-level names.
195 Besides removing any initial underscore prepended by the system, this
196 makes \*(C+ function names readable.  Different compilers have different
197 mangling styles. The optional demangling style argument can be used to
198 choose an appropriate demangling style for your compiler.
199 .IP "\fB\-e\fR \fIfilename\fR" 4
200 .IX Item "-e filename"
201 .PD 0
202 .IP "\fB\-\-exe=\fR\fIfilename\fR" 4
203 .IX Item "--exe=filename"
204 .PD
205 Specify the name of the executable for which addresses should be
206 translated.  The default file is \fIa.out\fR.
207 .IP "\fB\-f\fR" 4
208 .IX Item "-f"
209 .PD 0
210 .IP "\fB\-\-functions\fR" 4
211 .IX Item "--functions"
212 .PD
213 Display function names as well as file and line number information.
214 .IP "\fB\-s\fR" 4
215 .IX Item "-s"
216 .PD 0
217 .IP "\fB\-\-basenames\fR" 4
218 .IX Item "--basenames"
219 .PD
220 Display only the base of each file name.
221 .IP "\fB\-i\fR" 4
222 .IX Item "-i"
223 .PD 0
224 .IP "\fB\-\-inlines\fR" 4
225 .IX Item "--inlines"
226 .PD
227 If the address belongs to a function that was inlined, the source
228 information for all enclosing scopes back to the first non-inlined
229 function will also be printed.  For example, if \f(CW\*(C`main\*(C'\fR inlines
230 \&\f(CW\*(C`callee1\*(C'\fR which inlines \f(CW\*(C`callee2\*(C'\fR, and address is from
231 \&\f(CW\*(C`callee2\*(C'\fR, the source information for \f(CW\*(C`callee1\*(C'\fR and \f(CW\*(C`main\*(C'\fR
232 will also be printed.
233 .IP "\fB\-j\fR" 4
234 .IX Item "-j"
235 .PD 0
236 .IP "\fB\-\-section\fR" 4
237 .IX Item "--section"
238 .PD
239 Read offsets relative to the specified section instead of absolute addresses.
240 .IP "\fB@\fR\fIfile\fR" 4
241 .IX Item "@file"
242 Read command-line options from \fIfile\fR.  The options read are
243 inserted in place of the original @\fIfile\fR option.  If \fIfile\fR
244 does not exist, or cannot be read, then the option will be treated
245 literally, and not removed.
246 .Sp
247 Options in \fIfile\fR are separated by whitespace.  A whitespace
248 character may be included in an option by surrounding the entire
249 option in either single or double quotes.  Any character (including a
250 backslash) may be included by prefixing the character to be included
251 with a backslash.  The \fIfile\fR may itself contain additional
252 @\fIfile\fR options; any such options will be processed recursively.
253 .SH "SEE ALSO"
254 .IX Header "SEE ALSO"
255 Info entries for \fIbinutils\fR.
256 .SH "COPYRIGHT"
257 .IX Header "COPYRIGHT"
258 Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
259 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
260 .PP
261 Permission is granted to copy, distribute and/or modify this document
262 under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
263 or any later version published by the Free Software Foundation;
264 with no Invariant Sections, with no Front-Cover Texts, and with no
265 Back-Cover Texts.  A copy of the license is included in the
266 section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".