Index: runtime/vm/native_symbol_macos.cc |
diff --git a/runtime/vm/native_symbol_macos.cc b/runtime/vm/native_symbol_macos.cc |
index 3b240bdacc5042d3cad7dbb6e7f36f5b44fa1091..4de33cef80b62eb1b3c5cfa9f91a6ee4990fadcc 100644 |
--- a/runtime/vm/native_symbol_macos.cc |
+++ b/runtime/vm/native_symbol_macos.cc |
@@ -8,6 +8,7 @@ |
#include "vm/native_symbol.h" |
#include "vm/thread.h" |
+#include <cxxabi.h> // NOLINT |
#include <dlfcn.h> // NOLINT |
namespace dart { |
@@ -29,6 +30,11 @@ char* NativeSymbolResolver::LookupSymbolName(uintptr_t pc) { |
if (info.dli_sname == NULL) { |
return NULL; |
} |
+ int status; |
+ char* demangled = abi::__cxa_demangle(info.dli_sname, NULL, NULL, &status); |
+ if (status == 0) { |
+ return demangled; |
+ } |
return strdup(info.dli_sname); |
} |