Linux command
c++filt 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Demangle a C++ symbol
c++filt [_Z1fv]
Demangle from stdin
echo "[_Z3fooi]" | c++filt
Demangle without function parameters
c++filt -p [symbol]
Demangle with types
c++filt -t [symbol]
Strip leading underscore
c++filt -_ [symbol]
Demangle dynamic symbols from ELF
readelf -W --dyn-syms [binary] | c++filt
说明
c++filt decodes (demangles) C++ and Java low-level symbol names into their original user-readable form. C++ compilers encode function names to handle overloading, and this tool reverses that process. Without arguments, reads symbols from stdin. Can process entire assembler source files containing mangled names.
参数
- -_, --strip-underscore
- Remove initial underscore from symbols
- -n, --no-strip-underscore
- Do not remove initial underscore
- -p, --no-params
- Don't display function parameter types
- -t, --types
- Demangle types as well as function names
- -s _format_, --format=_format_
- Specify mangling format (gnu, lucid, arm, hp, edg, gnu-v3, java, gnat, dlang, rust)
- -r, --no-recurse-limit
- Disable recursion limit (default: 2048 levels)
- --help
- Display help
- --version
- Display version
FAQ
What is the c++filt command used for?
c++filt decodes (demangles) C++ and Java low-level symbol names into their original user-readable form. C++ compilers encode function names to handle overloading, and this tool reverses that process. Without arguments, reads symbols from stdin. Can process entire assembler source files containing mangled names.
How do I run a basic c++filt example?
Run `c++filt [_Z1fv]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -_, --strip-underscore do in c++filt?
Remove initial underscore from symbols