I have used the following function in the past to demangle c++ symbols it has proved very useful:
char* __cxa_demangle(const char* __mangled_name, char* __output_buffer, size_t* __length, int* __status);
Now I work on a C application that uses gcc, but cannot use __cxa_demangle as it is a C program (it's only available with g++ the C++ compiler), in C++ I would have typically called as follows:
abi::__cxa_demangle(mangled.c_str(), NULL, 0, 0);
Anybody know how to achieve the same in C?