Index: runtime/vm/native_symbol_android.cc |
diff --git a/runtime/vm/native_symbol_android.cc b/runtime/vm/native_symbol_android.cc |
index b178019bbc5fc5e97208177ce949b57f3d6a42b3..1647e59556372e9dc2ab7cfd147d8e2864ba43ef 100644 |
--- a/runtime/vm/native_symbol_android.cc |
+++ b/runtime/vm/native_symbol_android.cc |
@@ -38,6 +38,19 @@ void NativeSymbolResolver::FreeSymbolName(char* name) { |
} |
+bool NativeSymbolResolver::LookupSharedObject(uword pc, |
+ uword* dso_base, |
+ char** dso_name) { |
+ Dl_info info; |
+ int r = dladdr(reinterpret_cast<void*>(pc), &info); |
+ if (r == 0) { |
+ return false; |
+ } |
+ *dso_base = reinterpret_cast<uword>(info.dli_fbase); |
+ *dso_name = strdup(info.dli_fname); |
+ return true; |
+} |
+ |
} // namespace dart |
#endif // defined(HOST_OS_ANDROID) |