Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(807)

Unified Diff: runtime/vm/native_symbol_linux.cc

Issue 100133004: Bucket unknown symbols by PC and demangle native symbols (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/native_symbol_macos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | runtime/vm/native_symbol_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698