Linux "addr2line" Command Line Options and Examples
convert addresses into file names and line numbers.

addr2line translates addresses into file names and line numbers. Given an address in an executable or an offset in a section of a relocatable object, it uses the debugging information to figure out which file name and line number are associated with it. The executable or relocatable object to use is specified with the -e option.


Usage:

addr2line [-a|--addresses]
[-b bfdname|--target=bfdname]
[-C|--demangle[=style]]
[-e filename|--exe=filename]
[-f|--functions] [-s|--basename]
[-i|--inlines]
[-p|--pretty-print]
[-j|--section=name]
[-H|--help] [-V|--version]
[addr addr ...]




Command Line Options:

--addresses
Display the address before the function name, file and line number information. The address is printed with a 0x prefix toeasily identify it.
addr2line --addresses ...
--target
Specify that the object-code format for the object files is bfdname.
addr2line --target ...
--demangle[
Decode (demangle) low-level symbol names into user-level names. Besides removing any initial underscore prepended by the system,this makes C++ function names readable. Different compilers have different mangling styles. The optional demangling styleargument can be used to choose an appropriate demangling style for your compiler.
addr2line --demangle[ ...
--exe
Specify the name of the executable for which addresses should be translated. The default file is a.out.
addr2line --exe ...
--functions
Display function names as well as file and line number information.
addr2line --functions ...
--basenames
Display only the base of each file name.
addr2line --basenames ...
--inlines
If the address belongs to a function that was inlined, the source information for all enclosing scopes back to the first non-inlined function will also be printed. For example, if "main" inlines "callee1" which inlines "callee2", and address is from"callee2", the source information for "callee1" and "main" will also be printed.
addr2line --inlines ...
--section
Read offsets relative to the specified section instead of absolute addresses.
addr2line --section ...
--pretty-print
Make the output more human friendly: each location are printed on one line. If option -i is specified, lines for all enclosingscopes are prefixed with (inlined by).@fileRead command-line options from file. The options read are inserted in place of the original @file option. If file does notexist, or cannot be read, then the option will be treated literally, and not removed.Options in file are separated by whitespace. A whitespace character may be included in an option by surrounding the entireoption in either single or double quotes. Any character (including a backslash) may be included by prefixing the character to beincluded with a backslash. The file may itself contain additional @file options; any such options will be processed recursively.
addr2line --pretty-print ...