⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c--filt.html

📁 gcc手册
💻 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="c++filt">c++filt</a>,

Next:<a rel="next" accesskey="n" href="addr2line.html#addr2line">addr2line</a>,

Previous:<a rel="previous" accesskey="p" href="strip.html#strip">strip</a>,

Up:<a rel="up" accesskey="u" href="index.html#Top">Top</a>

<hr><br>

</div>



<h2 class="chapter">c++filt</h2>



<pre class="smallexample">     c++filt [<code>-_</code>|<code>--strip-underscores</code>]

             [<code>-j</code>|<code>--java</code>]

             [<code>-n</code>|<code>--no-strip-underscores</code>]

             [<code>-s</code> <var>format</var>|<code>--format=</code><var>format</var>]

             [<code>--help</code>]  [<code>--version</code>]  [<var>symbol</var>...]

     </pre>



   <p>The C++ and Java languages provides function overloading, which means

that you can write many functions with the same name (providing each

takes parameters of different types).  All C++ and Java function names

are encoded into a low-level assembly label (this process is known as

<dfn>mangling</dfn>). The <code>c++filt</code>

<a rel="footnote" href="#fn-1"><sup>1</sup></a>

program does the inverse mapping: it decodes (<dfn>demangles</dfn>) low-level

names into user-level names so that the linker can keep these overloaded

functions from clashing.



   <p>Every alphanumeric word (consisting of letters, digits, underscores,

dollars, or periods) seen in the input is a potential label.  If the

label decodes into a C++ name, the C++ name replaces the low-level

name in the output.



   <p>You can use <code>c++filt</code> to decipher individual symbols:



<pre class="example">     c++filt <var>symbol</var>

     </pre>



   <p>If no <var>symbol</var> arguments are given, <code>c++filt</code> reads symbol

names from the standard input and writes the demangled names to the

standard output.  All results are printed on the standard output.



     <dl>

<dt><code>-_</code>

     <dd><dt><code>--strip-underscores</code>

     <dd>On some systems, both the C and C++ compilers put an underscore in front

of every name.  For example, the C name <code>foo</code> gets the low-level

name <code>_foo</code>.  This option removes the initial underscore.  Whether

<code>c++filt</code> removes the underscore by default is target dependent.



     <br><dt><code>-j</code>

     <dd><dt><code>--java</code>

     <dd>Prints demangled names using Java syntax.  The default is to use C++

syntax.



     <br><dt><code>-n</code>

     <dd><dt><code>--no-strip-underscores</code>

     <dd>Do not remove the initial underscore.



     <br><dt><code>-s </code><var>format</var><code></code>

     <dd><dt><code>--format=</code><var>format</var><code></code>

     <dd><small>GNU</small> <code>nm</code> can decode three different methods of mangling, used by

different C++ compilers.  The argument to this option selects which

method it uses:



          <dl>

<dt><code>gnu</code>

          <dd>the one used by the <small>GNU</small> compiler (the default method)

<br><dt><code>lucid</code>

          <dd>the one used by the Lucid compiler

<br><dt><code>arm</code>

          <dd>the one specified by the C++ Annotated Reference Manual

<br><dt><code>hp</code>

          <dd>the one used by the HP compiler

<br><dt><code>edg</code>

          <dd>the one used by the EDG compiler

<br><dt><code>gnu-new-abi</code>

          <dd>the one used by the <small>GNU</small> compiler with the new ABI. 

</dl>



     <br><dt><code>--help</code>

     <dd>Print a summary of the options to <code>c++filt</code> and exit.



     <br><dt><code>--version</code>

     <dd>Print the version number of <code>c++filt</code> and exit. 

</dl>



   <blockquote>

<em>Warning:</em> <code>c++filt</code> is a new utility, and the details of its

user interface are subject to change in future releases.  In particular,

a command-line option may be required in the the future to decode a name

passed as an argument on the command line; in other words,



     <pre class="example">          c++filt <var>symbol</var>

          </pre>



     <p>may in a future release become



     <pre class="example">          c++filt <var>option</var> <var>symbol</var>

          </pre>

        </blockquote>



   <div class="footnote">

<hr>

<h4>Footnotes</h4>

<ol type="1">

<li><a name="fn-1"></a>

<p>MS-DOS does not allow <kbd>+</kbd> characters in file names, so on

MS-DOS this program is named <code>cxxfilt</code>.</p>



   </ol><hr></div>



   </body></html>



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -