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

Unified Diff: runtime/vm/native_symbol_android.cc

Issue 2723213002: DWARF and unwind support for AOT assembly output. (Closed)
Patch Set: . Created 3 years, 9 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
Index: runtime/vm/native_symbol_android.cc
diff --git a/runtime/vm/native_symbol_android.cc b/runtime/vm/native_symbol_android.cc
index 8cb3b6708d5da428a9ccd3d585e4fb36aad48ba1..e89d15f127122732d007ec59be14d8a8a49963a8 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(TARGET_OS_ANDROID)

Powered by Google App Engine
This is Rietveld 408576698