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

Unified Diff: runtime/vm/native_symbol_android.cc

Issue 2966553002: [profiler] Demangle native symbols on Android too. (Closed)
Patch Set: Created 3 years, 6 months 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/native_symbol_android.cc
diff --git a/runtime/vm/native_symbol_android.cc b/runtime/vm/native_symbol_android.cc
index 1647e59556372e9dc2ab7cfd147d8e2864ba43ef..d08c8ada3f4e79708a0eda9e30c9d85d5a6a0cca 100644
--- a/runtime/vm/native_symbol_android.cc
+++ b/runtime/vm/native_symbol_android.cc
@@ -7,7 +7,8 @@
#include "vm/native_symbol.h"
-#include <dlfcn.h> // NOLINT
+#include <cxxabi.h> // NOLINT
+#include <dlfcn.h> // NOLINT
namespace dart {
@@ -29,6 +30,13 @@ char* NativeSymbolResolver::LookupSymbolName(uintptr_t pc, uintptr_t* start) {
if (start != NULL) {
*start = reinterpret_cast<uintptr_t>(info.dli_saddr);
}
+ int status = 0;
+ size_t len = 0;
+ char* demangled = abi::__cxa_demangle(info.dli_sname, NULL, &len, &status);
+ MSAN_UNPOISON(demangled, len);
+ if (status == 0) {
+ return demangled;
+ }
return strdup(info.dli_sname);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698