Tuesday, May 26, 2009

c++filt

Every now and then when debugging some source code in c++, I come across mangled function names.

You can use c++filt to demangle the junk you see into recognizable user-level function names.

The theory is that the function names get mangled due to overloading. From the man page - ¨All C++ and Java function names are encoded into a low-level assembly label (this process is known as mangling). The c++filt program does the inverse mapping: it decodes (demangles) low-level names into user-level names so that the linker can keep the overloaded functions from clashing.¨

No comments: