How to demangle symbols using C++Filt

C++Filt is a utility that ships with GNU Binutils. It can be applied on mangled symbols to recover back the demangled symbol. This can be useful to recognize the original class method name and signature.

There are two ways in which this tool can be used:

  • To demangle a symbol directly:
$ c++filt _ZNK8KxVectorI6DlAtomjEixEj
KxVector<DlAtom, unsigned int>::operator[](unsigned int) const
  • To demangle the mangled output of another tool by piping it in. For example, I use it on the mangled symbols output by the symtree tool:
$ symtree foo | c++filt

Tried with: GNU Binutils 2.24 and Ubuntu 14.04

One thought on “How to demangle symbols using C++Filt”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s