Commit b7785f2d authored by Tiago Peixoto's avatar Tiago Peixoto

name_demangle(): Fallback if demangling fails

parent a54b52eb
......@@ -35,6 +35,8 @@ string name_demangle(string name)
{
int status = 0;
char *realname = abi::__cxa_demangle(name.c_str(), 0, 0, &status);
if (realname == nullptr)
return name + " (cannot demangle symbol)";
string ret(realname);
free(realname);
return ret;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment