1ADDR2LINE(1)                 GNU Development Tools                ADDR2LINE(1)
2
3
4

NAME

6       addr2line - convert addresses into file names and line numbers.
7

SYNOPSIS

9       addr2line [-a|--addresses]
10                 [-b bfdname|--target=bfdname]
11                 [-C|--demangle[=style]]
12                 [-e filename|--exe=filename]
13                 [-f|--functions] [-s|--basename]
14                 [-i|--inlines]
15                 [-p|--pretty-print]
16                 [-j|--section=name]
17                 [-H|--help] [-V|--version]
18                 [addr addr ...]
19

DESCRIPTION

21       addr2line translates addresses into file names and line numbers.  Given
22       an address in an executable or an offset in a section of a relocatable
23       object, it uses the debugging information to figure out which file name
24       and line number are associated with it.
25
26       The executable or relocatable object to use is specified with the -e
27       option.  The default is the file a.out.  The section in the relocatable
28       object to use is specified with the -j option.
29
30       addr2line has two modes of operation.
31
32       In the first, hexadecimal addresses are specified on the command line,
33       and addr2line displays the file name and line number for each address.
34
35       In the second, addr2line reads hexadecimal addresses from standard
36       input, and prints the file name and line number for each address on
37       standard output.  In this mode, addr2line may be used in a pipe to
38       convert dynamically chosen addresses.
39
40       The format of the output is FILENAME:LINENO.  The file name and line
41       number for each address is printed on a separate line.  If the -f
42       option is used, then each FILENAME:LINENO line is preceded by a
43       FUNCTIONNAME line which is the name of the function containing the
44       address.  If the -a option is used, then the address read is first
45       printed.
46
47       If the file name or function name can not be determined, addr2line will
48       print two question marks in their place.  If the line number can not be
49       determined, addr2line will print 0.
50

OPTIONS

52       The long and short forms of options, shown here as alternatives, are
53       equivalent.
54
55       -a
56       --addresses
57           Display address before function names or file and line number
58           information.  The address is printed with a 0x prefix to easily
59           identify it.
60
61       -b bfdname
62       --target=bfdname
63           Specify that the object-code format for the object files is
64           bfdname.
65
66       -C
67       --demangle[=style]
68           Decode (demangle) low-level symbol names into user-level names.
69           Besides removing any initial underscore prepended by the system,
70           this makes C++ function names readable.  Different compilers have
71           different mangling styles. The optional demangling style argument
72           can be used to choose an appropriate demangling style for your
73           compiler.
74
75       -e filename
76       --exe=filename
77           Specify the name of the executable for which addresses should be
78           translated.  The default file is a.out.
79
80       -f
81       --functions
82           Display function names as well as file and line number information.
83
84       -s
85       --basenames
86           Display only the base of each file name.
87
88       -i
89       --inlines
90           If the address belongs to a function that was inlined, the source
91           information for all enclosing scopes back to the first non-inlined
92           function will also be printed.  For example, if "main" inlines
93           "callee1" which inlines "callee2", and address is from "callee2",
94           the source information for "callee1" and "main" will also be
95           printed.
96
97       -j
98       --section
99           Read offsets relative to the specified section instead of absolute
100           addresses.
101
102       -p
103       --pretty-print
104           Make the output more human friendly: each location are printed on
105           one line.  If option -i is specified, lines for all enclosing
106           scopes are prefixed with (inlined by).
107
108       @file
109           Read command-line options from file.  The options read are inserted
110           in place of the original @file option.  If file does not exist, or
111           cannot be read, then the option will be treated literally, and not
112           removed.
113
114           Options in file are separated by whitespace.  A whitespace
115           character may be included in an option by surrounding the entire
116           option in either single or double quotes.  Any character (including
117           a backslash) may be included by prefixing the character to be
118           included with a backslash.  The file may itself contain additional
119           @file options; any such options will be processed recursively.
120

SEE ALSO

122       Info entries for binutils.
123
125       Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
126       2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
127       Software Foundation, Inc.
128
129       Permission is granted to copy, distribute and/or modify this document
130       under the terms of the GNU Free Documentation License, Version 1.3 or
131       any later version published by the Free Software Foundation; with no
132       Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
133       Texts.  A copy of the license is included in the section entitled "GNU
134       Free Documentation License".
135
136
137
138binutils-2.20.51.0.7              2011-05-02                      ADDR2LINE(1)
Impressum