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 [-b bfdname|--target=bfdname]
10                 [-C|--demangle[=style]]
11                 [-e filename|--exe=filename]
12                 [-f|--functions] [-s|--basename]
13                 [-i|--inlines]
14                 [-j|--section=name]
15                 [-H|--help] [-V|--version]
16                 [addr addr ...]
17

DESCRIPTION

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

OPTIONS

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

SEE ALSO

107       Info entries for binutils.
108
110       Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
111       2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free
112       Software Foundation, Inc.
113
114       Permission is granted to copy, distribute and/or modify this document
115       under the terms of the GNU Free Documentation License, Version 1.3 or
116       any later version published by the Free Software Foundation; with no
117       Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
118       Texts.  A copy of the license is included in the section entitled "GNU
119       Free Documentation License".
120
121
122
123binutils-2.20                     2009-10-16                      ADDR2LINE(1)
Impressum