addr2line
Translate addresses to source file locations
TLDR
Display the filename and line number from an instruction address
SYNOPSIS
addr2line [-e executable] [-f] [-C] [-s] [-i] [address...]
DESCRIPTION
addr2line translates addresses into file names and line numbers. Given an address in an executable or relocatable object, it uses the debugging information to figure out which file name and line number are associated with it.
This is particularly useful for interpreting crash dumps and debugging information from stack traces.
PARAMETERS
-e, --exe executable
Specify the executable to examine-f, --functions
Display function names as well as file and line number information-C, --demangle
Decode (demangle) low-level symbol names into user-level names (useful for C++)-s, --basenames
Display only the base of each file name rather than the full path-i, --inlines
If the address belongs to an inlined function, also print the caller information-p, --pretty-print
Print output in a human-readable format-a, --addresses
Display the address before the function name, file, and line
CAVEATS
Requires the executable to be compiled with debugging information (e.g., -g flag for gcc). Stripped executables will not provide useful output.
HISTORY
Part of GNU Binutils, a collection of binary tools for working with object files and executables.
