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 con‐
36       vert 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  FUNC‐
41       TIONNAME line which is the name of the function containing the address.
42
43       If the file name or function name can not be determined, addr2line will
44       print two question marks in their place.  If the line number can not be
45       determined, addr2line will print 0.
46

OPTIONS

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

SEE ALSO

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