Commit b7785f2d authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

name_demangle(): Fallback if demangling fails

parent a54b52eb
...@@ -35,6 +35,8 @@ string name_demangle(string name) ...@@ -35,6 +35,8 @@ string name_demangle(string name)
{ {
int status = 0; int status = 0;
char *realname = abi::__cxa_demangle(name.c_str(), 0, 0, &status); char *realname = abi::__cxa_demangle(name.c_str(), 0, 0, &status);
if (realname == nullptr)
return name + " (cannot demangle symbol)";
string ret(realname); string ret(realname);
free(realname); free(realname);
return ret; return ret;
......
Supports Markdown
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