From the libstdc++ documentation (abi Namespace Reference):
char* abi::__cxa_demangle(const char* mangled_name, char* output_buffer, size_t* length, int* status)
mangled_nameNUL-terminated character string containing the name to be demangled.output_buffermalloc, of *length bytes, into which the demangled name is stored. If output_buffer is not long enough, it is expanded using realloc. output_buffer may instead be NULL; in that case, the demangled name is placed in a region of memory allocated with malloc.lengthlength is non-NULL, the length of the buffer containing the demangled name is placed in *length.status*status is set to one of the following values: mangled_name is not a valid name under the C++ ABI mangling rules.NUL-terminated demangled name, or NULL if the demangling fails. The caller is responsible for deallocating this memory using free.