binutils: addr2line

1 
1 10 addr2line
1 ************
1 
1      addr2line [-a|--addresses]
1                [-b BFDNAME|--target=BFDNAME]
1                [-C|--demangle[=STYLE]]
1                [-e FILENAME|--exe=FILENAME]
1                [-f|--functions] [-s|--basename]
1                [-i|--inlines]
1                [-p|--pretty-print]
1                [-j|--section=NAME]
1                [-H|--help] [-V|--version]
1                [addr addr ...]
1 
1    'addr2line' translates addresses into file names and line numbers.
1 Given an address in an executable or an offset in a section of a
1 relocatable object, it uses the debugging information to figure out
1 which file name and line number are associated with it.
1 
1    The executable or relocatable object to use is specified with the
1 '-e' option.  The default is the file 'a.out'.  The section in the
1 relocatable object to use is specified with the '-j' option.
1 
1    'addr2line' has two modes of operation.
1 
1    In the first, hexadecimal addresses are specified on the command
1 line, and 'addr2line' displays the file name and line number for each
1 address.
1 
1    In the second, 'addr2line' reads hexadecimal addresses from standard
1 input, and prints the file name and line number for each address on
1 standard output.  In this mode, 'addr2line' may be used in a pipe to
1 convert dynamically chosen addresses.
1 
1    The format of the output is 'FILENAME:LINENO'.  By default each input
1 address generates one line of output.
1 
1    Two options can generate additional lines before each
1 'FILENAME:LINENO' line (in that order).
1 
1    If the '-a' option is used then a line with the input address is
1 displayed.
1 
1    If the '-f' option is used, then a line with the 'FUNCTIONNAME' is
1 displayed.  This is the name of the function containing the address.
1 
1    One option can generate additional lines after the 'FILENAME:LINENO'
1 line.
1 
1    If the '-i' option is used and the code at the given address is
1 present there because of inlining by the compiler then additional lines
1 are displayed afterwards.  One or two extra lines (if the '-f' option is
1 used) are displayed for each inlined function.
1 
1    Alternatively if the '-p' option is used then each input address
1 generates a single, long, output line containing the address, the
1 function name, the file name and the line number.  If the '-i' option
1 has also been used then any inlined functions will be displayed in the
1 same manner, but on separate lines, and prefixed by the text '(inlined
1 by)'.
1 
1    If the file name or function name can not be determined, 'addr2line'
1 will print two question marks in their place.  If the line number can
1 not be determined, 'addr2line' will print 0.
1 
1    The long and short forms of options, shown here as alternatives, are
1 equivalent.
1 
1 '-a'
1 '--addresses'
1      Display the address before the function name, file and line number
1      information.  The address is printed with a '0x' prefix to easily
1      identify it.
1 
1 '-b BFDNAME'
1 '--target=BFDNAME'
1      Specify that the object-code format for the object files is
1      BFDNAME.
1 
1 '-C'
1 '--demangle[=STYLE]'
1      Decode ("demangle") low-level symbol names into user-level names.
1      Besides removing any initial underscore prepended by the system,
1      this makes C++ function names readable.  Different compilers have
1      different mangling styles.  The optional demangling style argument
1      can be used to choose an appropriate demangling style for your
1      compiler.  ⇒c++filt, for more information on demangling.
1 
1 '-e FILENAME'
1 '--exe=FILENAME'
1      Specify the name of the executable for which addresses should be
1      translated.  The default file is 'a.out'.
1 
1 '-f'
1 '--functions'
1      Display function names as well as file and line number information.
1 
1 '-s'
1 '--basenames'
1      Display only the base of each file name.
1 
1 '-i'
1 '--inlines'
1      If the address belongs to a function that was inlined, the source
1      information for all enclosing scopes back to the first non-inlined
1      function will also be printed.  For example, if 'main' inlines
1      'callee1' which inlines 'callee2', and address is from 'callee2',
1      the source information for 'callee1' and 'main' will also be
1      printed.
1 
1 '-j'
1 '--section'
1      Read offsets relative to the specified section instead of absolute
1      addresses.
1 
1 '-p'
1 '--pretty-print'
1      Make the output more human friendly: each location are printed on
1      one line.  If option '-i' is specified, lines for all enclosing
1      scopes are prefixed with '(inlined by)'.
1