The cppfilt command converts between mangled C++ names and demangled names. You can run cppfilt in text mode to process C++ source and text files or binary mode to process object modules and libraries.The two modes take different options, as listed below. A detailed description of each option follows the list.
| Text Mode Options | Binary Mode Options |
|---|---|
| /C /H or /? /M /Q /S /T /Wwidth |
/C
/H or /? /N /O[ord] /P /Q /R /S /U /X /Z |
You can specify the options in any order, with the exception that to run cppfilt in binary mode, you must specify /B immediately after the cppfilt command name. You can set all options using the slash form, as shown in the table above, or in dash form. For example, -H is equivalent to /H.
The cppfilt command line options are:
| Syntax | Default |
|---|---|
| /C | Do not demangle stand-alone class names. |
Use /C to instruct the CPPFILT utility to demangle stand-alone class names. Stand-alone class names are names that do not appear within the context of a function name or member variable. These names are not normally produced by the compiler.
For example, the stand-alone class name Q2_1X1Y would be demangled as X::Y if you specify the /C option.
| Syntax | Default |
| /H /? |
Do not display help. |
Specify the /H or /? option see a short online help on the cppfilt command syntax and options.
| Syntax | Default |
| /M | Do not produce symbol map. |
Specify the /M option in text mode to produce a symbol map. The map contains a list of the mangled names and their corresponding demangled names. This output follows the normal filtered output.
| Syntax | Default |
| /N | Reference exported names by name. |
You should have no reason to use this option for the current version of VisualAge C++. You can specify the /N option in binary mode to generate the NONAME keyword. The /N options is used together with the /O option.
In earlier versions of VisualAge C++ and predecessor products, you could list exported symbols in EXPORTS statements in module definition (def) files.
The
output is consistent with the format required in module
definition (.def) files for earlier versions of VisualAge C++ for
Windows, where the NONAME keyword indicated that the
exported names are to be referenced by their ordinals, and not by
their names.
| Syntax | Default |
| /O[ord] | Do not generate ordinals. |
You should have no reason to use this option for the current version of VisualAge C++. You can specify the /O option in binary mode to generate ordinals after each demangled name. If the optional numeric parameter ord is specified, generates ordinal numbers starting from the value of ord.
In earlier versions of VisualAge C++, you could list exported symbols in EXPORTS statements in module definition (def) files. The ordinals are generated with a beginning @ character to be consistent with EXPORTS statement syntax in module definition files.
| Syntax | Default |
| /P | Do not include public symbols in output. |
Specify the /P option in binary mode to include all public symbols in the output. Public symbols are those that appear in PUBDEF, COMDAT, COMDEF sections of compiled code. Only the first occurrence of a symbol found within the COMDAT sections will be included in the output. Subsequent occurrences of the same COMDAT symbol will appear as comments in the output.
If you do not specify any of the /X, /R, or /P options, the output includes only the library and object names, without any symbol names.
| Syntax | Default |
| /Q | Display logo and copyright notice. |
Specify the /Q option to suppress the display of the logo and copyright notice for the cppfilt utility.
| Syntax | Default |
| /R | Do not include referenced symbols in output. |
Specify the /R option in binary mode to include all referenced symbols in the output. Referenced symbols are those that appear in EXTDEF sections of compiled code
If you do not specify any of the /X, /R, or /P options, the output includes only the library and object names, without any symbol names.
| Syntax | Default |
| /S | Do not demangle special compiler-generated symbol names. |
Specify the /S option to instruct the CPPFILT utility to demangle special compiler-generated symbol names. For example, the compiler-generated symbol name, __ct__3FooFUi, that represents a constructor for the class Foo would be demangled as Foo::Foo(unsigned int).
| Syntax | Default |
| /T | Replace mangled name with demangled name only. |
Specify the /T option in text mode to produce side-by-side demangling. In side-by-side demangling, each mangled name is replaced with the demangled name followed by the original mangled name in the text.
| Syntax | Default |
| /U | Leave leading underscores in mangled names. |
Specify the /U option in binary mode to remove a single leading underscore, if one is present, from mangled names. If more than one leading underscore is present, only one is removed.
| Syntax | Default |
| /X | Do not include exported symbols in output |
Specify the /X option in binary mode to include all exported symbols in the output. Exported symbols are those that appear in EXPDEF sections of compiled code
If you do not specify any of the /X, /R, or /P options, the output includes only the library and object names, without any symbol names.
| Syntax | Default |
| /Z | Include mangled names in the output as comments. |
Specify the /Z option in binary mode to suppress all comments in the output.
| Syntax | Default |
| /Wwidth | Do not use a fixed field width for demangled names. |
Specify the /Wwidth option in text mode to print the demangled names in fields width characters wide. If the name is shorter than width, it is padded to the right with blanks; if longer, it is truncated to width characters.
![]()
Static and Dynamic
Link Libraries
Decorated and Mangled Names
Sections and Segments
![]()
Demangle C++ Names
Get Mangled Names for C++
Symbols
