aarch64-none-linux-gnu-c++filt.1 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. .\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35)
  2. .\"
  3. .\" Standard preamble:
  4. .\" ========================================================================
  5. .de Sp \" Vertical space (when we can't use .PP)
  6. .if t .sp .5v
  7. .if n .sp
  8. ..
  9. .de Vb \" Begin verbatim text
  10. .ft CW
  11. .nf
  12. .ne \\$1
  13. ..
  14. .de Ve \" End verbatim text
  15. .ft R
  16. .fi
  17. ..
  18. .\" Set up some character translations and predefined strings. \*(-- will
  19. .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
  20. .\" double quote, and \*(R" will give a right double quote. \*(C+ will
  21. .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
  22. .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
  23. .\" nothing in troff, for use with C<>.
  24. .tr \(*W-
  25. .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
  26. .ie n \{\
  27. . ds -- \(*W-
  28. . ds PI pi
  29. . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
  30. . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
  31. . ds L" ""
  32. . ds R" ""
  33. . ds C` ""
  34. . ds C' ""
  35. 'br\}
  36. .el\{\
  37. . ds -- \|\(em\|
  38. . ds PI \(*p
  39. . ds L" ``
  40. . ds R" ''
  41. . ds C`
  42. . ds C'
  43. 'br\}
  44. .\"
  45. .\" Escape single quotes in literal strings from groff's Unicode transform.
  46. .ie \n(.g .ds Aq \(aq
  47. .el .ds Aq '
  48. .\"
  49. .\" If the F register is >0, we'll generate index entries on stderr for
  50. .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
  51. .\" entries marked with X<> in POD. Of course, you'll have to process the
  52. .\" output yourself in some meaningful fashion.
  53. .\"
  54. .\" Avoid warning from groff about undefined register 'F'.
  55. .de IX
  56. ..
  57. .if !\nF .nr F 0
  58. .if \nF>0 \{\
  59. . de IX
  60. . tm Index:\\$1\t\\n%\t"\\$2"
  61. ..
  62. . if !\nF==2 \{\
  63. . nr % 0
  64. . nr F 2
  65. . \}
  66. .\}
  67. .\"
  68. .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
  69. .\" Fear. Run. Save yourself. No user-serviceable parts.
  70. . \" fudge factors for nroff and troff
  71. .if n \{\
  72. . ds #H 0
  73. . ds #V .8m
  74. . ds #F .3m
  75. . ds #[ \f1
  76. . ds #] \fP
  77. .\}
  78. .if t \{\
  79. . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
  80. . ds #V .6m
  81. . ds #F 0
  82. . ds #[ \&
  83. . ds #] \&
  84. .\}
  85. . \" simple accents for nroff and troff
  86. .if n \{\
  87. . ds ' \&
  88. . ds ` \&
  89. . ds ^ \&
  90. . ds , \&
  91. . ds ~ ~
  92. . ds /
  93. .\}
  94. .if t \{\
  95. . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
  96. . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
  97. . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
  98. . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
  99. . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
  100. . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
  101. .\}
  102. . \" troff and (daisy-wheel) nroff accents
  103. .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
  104. .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
  105. .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
  106. .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
  107. .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
  108. .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
  109. .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
  110. .ds ae a\h'-(\w'a'u*4/10)'e
  111. .ds Ae A\h'-(\w'A'u*4/10)'E
  112. . \" corrections for vroff
  113. .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
  114. .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
  115. . \" for low resolution devices (crt and lpr)
  116. .if \n(.H>23 .if \n(.V>19 \
  117. \{\
  118. . ds : e
  119. . ds 8 ss
  120. . ds o a
  121. . ds d- d\h'-1'\(ga
  122. . ds D- D\h'-1'\(hy
  123. . ds th \o'bp'
  124. . ds Th \o'LP'
  125. . ds ae ae
  126. . ds Ae AE
  127. .\}
  128. .rm #[ #] #H #V #F C
  129. .\" ========================================================================
  130. .\"
  131. .IX Title "C++FILT 1"
  132. .TH C++FILT 1 "2021-07-02" "binutils-2.36.1" "GNU Development Tools"
  133. .\" For nroff, turn off justification. Always turn off hyphenation; it makes
  134. .\" way too many mistakes in technical documents.
  135. .if n .ad l
  136. .nh
  137. .SH "NAME"
  138. c++filt \- demangle C++ and Java symbols
  139. .SH "SYNOPSIS"
  140. .IX Header "SYNOPSIS"
  141. c++filt [\fB\-_\fR|\fB\-\-strip\-underscore\fR]
  142. [\fB\-n\fR|\fB\-\-no\-strip\-underscore\fR]
  143. [\fB\-p\fR|\fB\-\-no\-params\fR]
  144. [\fB\-t\fR|\fB\-\-types\fR]
  145. [\fB\-i\fR|\fB\-\-no\-verbose\fR]
  146. [\fB\-r\fR|\fB\-\-no\-recurse\-limit\fR]
  147. [\fB\-R\fR|\fB\-\-recurse\-limit\fR]
  148. [\fB\-s\fR \fIformat\fR|\fB\-\-format=\fR\fIformat\fR]
  149. [\fB\-\-help\fR] [\fB\-\-version\fR] [\fIsymbol\fR...]
  150. .SH "DESCRIPTION"
  151. .IX Header "DESCRIPTION"
  152. The \*(C+ and Java languages provide function overloading, which means
  153. that you can write many functions with the same name, providing that
  154. each function takes parameters of different types. In order to be
  155. able to distinguish these similarly named functions \*(C+ and Java
  156. encode them into a low-level assembler name which uniquely identifies
  157. each different version. This process is known as \fImangling\fR. The
  158. \&\fBc++filt\fR
  159. [1]
  160. program does the inverse mapping: it decodes (\fIdemangles\fR) low-level
  161. names into user-level names so that they can be read.
  162. .PP
  163. Every alphanumeric word (consisting of letters, digits, underscores,
  164. dollars, or periods) seen in the input is a potential mangled name.
  165. If the name decodes into a \*(C+ name, the \*(C+ name replaces the
  166. low-level name in the output, otherwise the original word is output.
  167. In this way you can pass an entire assembler source file, containing
  168. mangled names, through \fBc++filt\fR and see the same source file
  169. containing demangled names.
  170. .PP
  171. You can also use \fBc++filt\fR to decipher individual symbols by
  172. passing them on the command line:
  173. .PP
  174. .Vb 1
  175. \& c++filt <symbol>
  176. .Ve
  177. .PP
  178. If no \fIsymbol\fR arguments are given, \fBc++filt\fR reads symbol
  179. names from the standard input instead. All the results are printed on
  180. the standard output. The difference between reading names from the
  181. command line versus reading names from the standard input is that
  182. command-line arguments are expected to be just mangled names and no
  183. checking is performed to separate them from surrounding text. Thus
  184. for example:
  185. .PP
  186. .Vb 1
  187. \& c++filt \-n _Z1fv
  188. .Ve
  189. .PP
  190. will work and demangle the name to \*(L"f()\*(R" whereas:
  191. .PP
  192. .Vb 1
  193. \& c++filt \-n _Z1fv,
  194. .Ve
  195. .PP
  196. will not work. (Note the extra comma at the end of the mangled
  197. name which makes it invalid). This command however will work:
  198. .PP
  199. .Vb 1
  200. \& echo _Z1fv, | c++filt \-n
  201. .Ve
  202. .PP
  203. and will display \*(L"f(),\*(R", i.e., the demangled name followed by a
  204. trailing comma. This behaviour is because when the names are read
  205. from the standard input it is expected that they might be part of an
  206. assembler source file where there might be extra, extraneous
  207. characters trailing after a mangled name. For example:
  208. .PP
  209. .Vb 1
  210. \& .type _Z1fv, @function
  211. .Ve
  212. .SH "OPTIONS"
  213. .IX Header "OPTIONS"
  214. .IP "\fB\-_\fR" 4
  215. .IX Item "-_"
  216. .PD 0
  217. .IP "\fB\-\-strip\-underscore\fR" 4
  218. .IX Item "--strip-underscore"
  219. .PD
  220. On some systems, both the C and \*(C+ compilers put an underscore in front
  221. of every name. For example, the C name \f(CW\*(C`foo\*(C'\fR gets the low-level
  222. name \f(CW\*(C`_foo\*(C'\fR. This option removes the initial underscore. Whether
  223. \&\fBc++filt\fR removes the underscore by default is target dependent.
  224. .IP "\fB\-n\fR" 4
  225. .IX Item "-n"
  226. .PD 0
  227. .IP "\fB\-\-no\-strip\-underscore\fR" 4
  228. .IX Item "--no-strip-underscore"
  229. .PD
  230. Do not remove the initial underscore.
  231. .IP "\fB\-p\fR" 4
  232. .IX Item "-p"
  233. .PD 0
  234. .IP "\fB\-\-no\-params\fR" 4
  235. .IX Item "--no-params"
  236. .PD
  237. When demangling the name of a function, do not display the types of
  238. the function's parameters.
  239. .IP "\fB\-t\fR" 4
  240. .IX Item "-t"
  241. .PD 0
  242. .IP "\fB\-\-types\fR" 4
  243. .IX Item "--types"
  244. .PD
  245. Attempt to demangle types as well as function names. This is disabled
  246. by default since mangled types are normally only used internally in
  247. the compiler, and they can be confused with non-mangled names. For example,
  248. a function called \*(L"a\*(R" treated as a mangled type name would be
  249. demangled to \*(L"signed char\*(R".
  250. .IP "\fB\-i\fR" 4
  251. .IX Item "-i"
  252. .PD 0
  253. .IP "\fB\-\-no\-verbose\fR" 4
  254. .IX Item "--no-verbose"
  255. .PD
  256. Do not include implementation details (if any) in the demangled
  257. output.
  258. .IP "\fB\-r\fR" 4
  259. .IX Item "-r"
  260. .PD 0
  261. .IP "\fB\-R\fR" 4
  262. .IX Item "-R"
  263. .IP "\fB\-\-recurse\-limit\fR" 4
  264. .IX Item "--recurse-limit"
  265. .IP "\fB\-\-no\-recurse\-limit\fR" 4
  266. .IX Item "--no-recurse-limit"
  267. .IP "\fB\-\-recursion\-limit\fR" 4
  268. .IX Item "--recursion-limit"
  269. .IP "\fB\-\-no\-recursion\-limit\fR" 4
  270. .IX Item "--no-recursion-limit"
  271. .PD
  272. Enables or disables a limit on the amount of recursion performed
  273. whilst demangling strings. Since the name mangling formats allow for
  274. an infinite level of recursion it is possible to create strings whose
  275. decoding will exhaust the amount of stack space available on the host
  276. machine, triggering a memory fault. The limit tries to prevent this
  277. from happening by restricting recursion to 2048 levels of nesting.
  278. .Sp
  279. The default is for this limit to be enabled, but disabling it may be
  280. necessary in order to demangle truly complicated names. Note however
  281. that if the recursion limit is disabled then stack exhaustion is
  282. possible and any bug reports about such an event will be rejected.
  283. .Sp
  284. The \fB\-r\fR option is a synonym for the
  285. \&\fB\-\-no\-recurse\-limit\fR option. The \fB\-R\fR option is a
  286. synonym for the \fB\-\-recurse\-limit\fR option.
  287. .IP "\fB\-s\fR \fIformat\fR" 4
  288. .IX Item "-s format"
  289. .PD 0
  290. .IP "\fB\-\-format=\fR\fIformat\fR" 4
  291. .IX Item "--format=format"
  292. .PD
  293. \&\fBc++filt\fR can decode various methods of mangling, used by
  294. different compilers. The argument to this option selects which
  295. method it uses:
  296. .RS 4
  297. .ie n .IP """auto""" 4
  298. .el .IP "\f(CWauto\fR" 4
  299. .IX Item "auto"
  300. Automatic selection based on executable (the default method)
  301. .ie n .IP """gnu""" 4
  302. .el .IP "\f(CWgnu\fR" 4
  303. .IX Item "gnu"
  304. the one used by the \s-1GNU \*(C+\s0 compiler (g++)
  305. .ie n .IP """lucid""" 4
  306. .el .IP "\f(CWlucid\fR" 4
  307. .IX Item "lucid"
  308. the one used by the Lucid compiler (lcc)
  309. .ie n .IP """arm""" 4
  310. .el .IP "\f(CWarm\fR" 4
  311. .IX Item "arm"
  312. the one specified by the \*(C+ Annotated Reference Manual
  313. .ie n .IP """hp""" 4
  314. .el .IP "\f(CWhp\fR" 4
  315. .IX Item "hp"
  316. the one used by the \s-1HP\s0 compiler (aCC)
  317. .ie n .IP """edg""" 4
  318. .el .IP "\f(CWedg\fR" 4
  319. .IX Item "edg"
  320. the one used by the \s-1EDG\s0 compiler
  321. .ie n .IP """gnu\-v3""" 4
  322. .el .IP "\f(CWgnu\-v3\fR" 4
  323. .IX Item "gnu-v3"
  324. the one used by the \s-1GNU \*(C+\s0 compiler (g++) with the V3 \s-1ABI.\s0
  325. .ie n .IP """java""" 4
  326. .el .IP "\f(CWjava\fR" 4
  327. .IX Item "java"
  328. the one used by the \s-1GNU\s0 Java compiler (gcj)
  329. .ie n .IP """gnat""" 4
  330. .el .IP "\f(CWgnat\fR" 4
  331. .IX Item "gnat"
  332. the one used by the \s-1GNU\s0 Ada compiler (\s-1GNAT\s0).
  333. .RE
  334. .RS 4
  335. .RE
  336. .IP "\fB\-\-help\fR" 4
  337. .IX Item "--help"
  338. Print a summary of the options to \fBc++filt\fR and exit.
  339. .IP "\fB\-\-version\fR" 4
  340. .IX Item "--version"
  341. Print the version number of \fBc++filt\fR and exit.
  342. .IP "\fB@\fR\fIfile\fR" 4
  343. .IX Item "@file"
  344. Read command-line options from \fIfile\fR. The options read are
  345. inserted in place of the original @\fIfile\fR option. If \fIfile\fR
  346. does not exist, or cannot be read, then the option will be treated
  347. literally, and not removed.
  348. .Sp
  349. Options in \fIfile\fR are separated by whitespace. A whitespace
  350. character may be included in an option by surrounding the entire
  351. option in either single or double quotes. Any character (including a
  352. backslash) may be included by prefixing the character to be included
  353. with a backslash. The \fIfile\fR may itself contain additional
  354. @\fIfile\fR options; any such options will be processed recursively.
  355. .SH "FOOTNOTES"
  356. .IX Header "FOOTNOTES"
  357. .IP "1." 4
  358. MS-DOS does not allow \f(CW\*(C`+\*(C'\fR characters in file names, so on
  359. MS-DOS this program is named \fB\s-1CXXFILT\s0\fR.
  360. .SH "SEE ALSO"
  361. .IX Header "SEE ALSO"
  362. the Info entries for \fIbinutils\fR.
  363. .SH "COPYRIGHT"
  364. .IX Header "COPYRIGHT"
  365. Copyright (c) 1991\-2021 Free Software Foundation, Inc.
  366. .PP
  367. Permission is granted to copy, distribute and/or modify this document
  368. under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3
  369. or any later version published by the Free Software Foundation;
  370. with no Invariant Sections, with no Front-Cover Texts, and with no
  371. Back-Cover Texts. A copy of the license is included in the
  372. section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".