![Forrest logo](/images/logo.png)
addr2line:tldr:40afc
The command addr2line
is a utility tool that is used to decode an address in a given executable file and provides information about the corresponding source code file and line number where that address resides.
The command itself consists of several options and arguments:
-
--exe=${path-to-executable}
: This option specifies the path to the executable file in which the address is located. You need to replace${path-to-executable}
with the actual path to the executable file. -
--functions
: This option tellsaddr2line
to display the function name associated with the given address. -
${address}
: This is the address you want to decode. It can be a memory address or an offset relative to the base address of the executable.
When you execute the addr2line
command with the specified options and address, it will look up the address in the executable file, map it to the corresponding function name, source code file, and line number, and then display this information on the terminal.