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

Unified Diff: runtime/vm/native_symbol_linux.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_linux.cc
diff --git a/runtime/vm/native_symbol_linux.cc b/runtime/vm/native_symbol_linux.cc
index 9556ddb615825005011224b7fd38a019bba9de98..aac30172d706919294cee513c05f705682bb6d2b 100644
--- a/runtime/vm/native_symbol_linux.cc
+++ b/runtime/vm/native_symbol_linux.cc
@@ -47,6 +47,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_LINUX)

Powered by Google App Engine
This is Rietveld 408576698