[go: nahoru, domu]

tcmalloc: fixed config_linux.h to build for arm targets.

BUG=chromium-os:34620
TEST=trybot


Review URL: https://chromiumcodereview.appspot.com/10970030

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158903 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/third_party/tcmalloc/chromium/src/config_linux.h b/third_party/tcmalloc/chromium/src/config_linux.h
index 25c8da8..abf0442 100644
--- a/third_party/tcmalloc/chromium/src/config_linux.h
+++ b/third_party/tcmalloc/chromium/src/config_linux.h
@@ -213,7 +213,14 @@
 #define PACKAGE_VERSION "1.7"
 
 /* How to access the PC from a struct ucontext */
+/* TODO(asharif): configure.ac should be changed such that this define gets
+ * generated automatically. That change should go to upstream and then pulled
+ * back here. */
+#if defined(__arm__)
+#define PC_FROM_UCONTEXT uc_mcontext.arm_pc
+#else
 #define PC_FROM_UCONTEXT uc_mcontext.gregs[REG_RIP]
+#endif
 
 /* Always the empty-string on non-windows systems. On windows, should be
    "__declspec(dllexport)". This way, when we compile the dll, we export our