Index: runtime/vm/native_symbol_fuchsia.cc |
diff --git a/runtime/vm/native_symbol_fuchsia.cc b/runtime/vm/native_symbol_fuchsia.cc |
index 3123c0e9b2654e7fe89ed0a8c6466bf531d0b578..1c5c09745d5446ed5a69efc4418c1905e5a993ae 100644 |
--- a/runtime/vm/native_symbol_fuchsia.cc |
+++ b/runtime/vm/native_symbol_fuchsia.cc |
@@ -46,6 +46,20 @@ void NativeSymbolResolver::FreeSymbolName(char* name) { |
free(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_FUCHSIA) |