Index: runtime/vm/native_symbol_linux.cc |
diff --git a/runtime/vm/native_symbol_linux.cc b/runtime/vm/native_symbol_linux.cc |
index 225a4b0f01ade69ed472b50a879e6265c991c51b..4a0e12fad2d21bd177234fe9be13ece7a65b161b 100644 |
--- a/runtime/vm/native_symbol_linux.cc |
+++ b/runtime/vm/native_symbol_linux.cc |
@@ -8,7 +8,7 @@ |
#include "vm/native_symbol.h" |
#include "vm/thread.h" |
- |
+#include <cxxabi.h> // NOLINT |
#include <dlfcn.h> // NOLINT |
namespace dart { |
@@ -30,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); |
} |