📄 addr2line.html
字号:
<html lang="en">
<head>
<title>GNU Binary Utilities</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="GNU Binary Utilities">
<meta name="generator" content="makeinfo 4.3">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home">
</head>
<body>
<div class="node">
<p>
Node:<a name="addr2line">addr2line</a>,
Next:<a rel="next" accesskey="n" href="nlmconv.html#nlmconv">nlmconv</a>,
Previous:<a rel="previous" accesskey="p" href="c--filt.html#c++filt">c++filt</a>,
Up:<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr><br>
</div>
<h2 class="chapter">addr2line</h2>
<pre class="smallexample"> addr2line [<code>-b</code> <var>bfdname</var>|<code>--target=</code><var>bfdname</var>]
[<code>-C</code>|<code>--demangle</code>[=<var>style</var>]]
[<code>-e</code> <var>filename</var>|<code>--exe=</code><var>filename</var>]
[<code>-f</code>|<code>--functions</code>] [<code>-s</code>|<code>--basename</code>]
[<code>-H</code>|<code>--help</code>] [<code>-V</code>|<code>--version</code>]
[addr addr ...]
</pre>
<p><code>addr2line</code> translates program addresses into file names and line
numbers. Given an address and an executable, it uses the debugging
information in the executable to figure out which file name and line
number are associated with a given address.
<p>The executable to use is specified with the <code>-e</code> option. The
default is the file <code>a.out</code>.
<p><code>addr2line</code> has two modes of operation.
<p>In the first, hexadecimal addresses are specified on the command line,
and <code>addr2line</code> displays the file name and line number for each
address.
<p>In the second, <code>addr2line</code> reads hexadecimal addresses from
standard input, and prints the file name and line number for each
address on standard output. In this mode, <code>addr2line</code> may be used
in a pipe to convert dynamically chosen addresses.
<p>The format of the output is <code>FILENAME:LINENO</code>. The file name and
line number for each address is printed on a separate line. If the
<code>-f</code> option is used, then each <code>FILENAME:LINENO</code> line is
preceded by a <code>FUNCTIONNAME</code> line which is the name of the function
containing the address.
<p>If the file name or function name can not be determined,
<code>addr2line</code> will print two question marks in their place. If the
line number can not be determined, <code>addr2line</code> will print 0.
<p>The long and short forms of options, shown here as alternatives, are
equivalent.
<dl>
<dt><code>-b </code><var>bfdname</var><code></code>
<dd><dt><code>--target=</code><var>bfdname</var><code></code>
<dd>Specify that the object-code format for the object files is
<var>bfdname</var>.
<br><dt><code>-C</code>
<dd><dt><code>--demangle[=</code><var>style</var><code>]</code>
<dd>Decode (<dfn>demangle</dfn>) 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 style argument can be used to
choose an appropriate demangling style for your compiler. See <a href="c--filt.html#c++filt">c++filt</a>,
for more information on demangling.
<br><dt><code>-e </code><var>filename</var><code></code>
<dd><dt><code>--exe=</code><var>filename</var><code></code>
<dd>Specify the name of the executable for which addresses should be
translated. The default file is <code>a.out</code>.
<br><dt><code>-f</code>
<dd><dt><code>--functions</code>
<dd>Display function names as well as file and line number information.
<br><dt><code>-s</code>
<dd><dt><code>--basenames</code>
<dd>Display only the base of each file name.
</dl>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -