# c++filt(1) ## Demangle symbol ```markdown c++-filt [opts] -t Try to also demangle types. ``` ## Demangle stream For example dynamic symbol table: ```markdown readelf -W --dyn-syms | c++filt ``` ## Demangle types ```c++ // file: type.cc #include #include #define P(ty) printf(#ty " -> %s\n", typeid(ty).name()) template struct Foo {}; int main() { P(int); P(unsigned char); P(Foo<>); P(Foo); } ``` Build and run: ```sh $ clang++ type.cc && ./a.out | c++filt int -> i unsigned char -> h Foo<> -> 3FooIvE Foo -> 3FooIiE $ clang++ type.cc && ./a.out | c++filt -t int -> int unsigned char -> unsigned char Foo<> -> Foo Foo -> Foo ```