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

Unified Diff: runtime/vm/os_linux.cc

Issue 12629004: Implement native call stub on ARM and native call redirection in ARM simulator. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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/os_linux.cc
===================================================================
--- runtime/vm/os_linux.cc (revision 19653)
+++ runtime/vm/os_linux.cc (working copy)
@@ -7,6 +7,7 @@
#include "vm/os.h"
+#include <dlfcn.h> // NOLINT
#include <errno.h> // NOLINT
#include <limits.h> // NOLINT
#include <malloc.h> // NOLINT
@@ -482,6 +483,18 @@
}
+const char* OS::ReverseLookupSymbol(uword address) {
+ // TODO(regis): This does not work for symbols of the main program.
+ // Passing -export-dynamic to the linker does not help.
+ Dl_info info;
+ if (dladdr(reinterpret_cast<void*>(address), &info)) {
Ivan Posva 2013/03/08 17:00:42 I am not sure this is allowed within the security
+ return info.dli_sname;
+ } else {
+ return NULL;
+ }
+}
+
+
void OS::PrintErr(const char* format, ...) {
va_list args;
va_start(args, format);
« runtime/vm/os_android.cc ('K') | « runtime/vm/os_android.cc ('k') | runtime/vm/os_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698