From 0decfdb042332845ca18b6776615e0685d7ba391 Mon Sep 17 00:00:00 2001 From: "mark@chromium.org" Date: Tue, 1 Apr 2014 18:20:36 +0000 Subject: [PATCH] Make ARM64 detection consistent in chromium. This is to uniform ARM64 detection code in chromium. Use only __aarch64__ and don't look for __arm64__ at all. Patch by Primiano Tucci BUG=chromium:354405, chromium:358092 Review URL: https://breakpad.appspot.com/1304002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1293 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/mac/handler/dynamic_images.h | 2 +- src/client/mac/handler/exception_handler.cc | 4 ++-- src/client/mac/handler/minidump_generator.h | 4 ++-- src/client/mac/handler/ucontext_compat.h | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/client/mac/handler/dynamic_images.h b/src/client/mac/handler/dynamic_images.h index 6f4c3377..65147900 100644 --- a/src/client/mac/handler/dynamic_images.h +++ b/src/client/mac/handler/dynamic_images.h @@ -285,7 +285,7 @@ class DynamicImages { return CPU_TYPE_POWERPC64; #elif defined(__arm__) return CPU_TYPE_ARM; -#elif defined(__arm64__) +#elif defined(__aarch64__) return CPU_TYPE_ARM64; #else #error "GetNativeCPUType not implemented for this architecture" diff --git a/src/client/mac/handler/exception_handler.cc b/src/client/mac/handler/exception_handler.cc index 58ecc415..2445cb23 100644 --- a/src/client/mac/handler/exception_handler.cc +++ b/src/client/mac/handler/exception_handler.cc @@ -326,7 +326,7 @@ bool ExceptionHandler::WriteMinidumpForChild(mach_port_t child, EXC_I386_BPT, #elif defined(__ppc__) || defined(__ppc64__) EXC_PPC_BREAKPOINT, -#elif defined(__arm__) || defined(__arm64__) +#elif defined(__arm__) || defined(__aarch64__) EXC_ARM_BREAKPOINT, #else #error architecture not supported @@ -522,7 +522,7 @@ void* ExceptionHandler::WaitForMessage(void* exception_handler_class) { exception_code = EXC_I386_BPT; #elif defined(__ppc__) || defined(__ppc64__) exception_code = EXC_PPC_BREAKPOINT; -#elif defined(__arm__) || defined(__arm64__) +#elif defined(__arm__) || defined(__aarch64__) exception_code = EXC_ARM_BREAKPOINT; #else #error architecture not supported diff --git a/src/client/mac/handler/minidump_generator.h b/src/client/mac/handler/minidump_generator.h index 3f7f8de0..4e4b4a68 100644 --- a/src/client/mac/handler/minidump_generator.h +++ b/src/client/mac/handler/minidump_generator.h @@ -51,7 +51,7 @@ #endif #if defined(__arm__) #define HAS_ARM_SUPPORT -#elif defined(__arm64__) +#elif defined(__aarch64__) #define HAS_ARM64_SUPPORT #elif defined(__i386__) || defined(__x86_64__) #define HAS_X86_SUPPORT @@ -207,7 +207,7 @@ class MinidumpGenerator { // CPU type of the task being dumped. cpu_type_t cpu_type_; - + // System information static char build_string_[16]; static int os_major_version_; diff --git a/src/client/mac/handler/ucontext_compat.h b/src/client/mac/handler/ucontext_compat.h index 093f9a24..1e4b752e 100644 --- a/src/client/mac/handler/ucontext_compat.h +++ b/src/client/mac/handler/ucontext_compat.h @@ -34,7 +34,7 @@ // The purpose of this file is to work around the fact that ucontext_t's // uc_mcontext member is an mcontext_t rather than an mcontext64_t on ARM64. -#if defined(__arm64__) +#if defined(__aarch64__) // doesn't include the below file. #include typedef ucontext64_t breakpad_ucontext_t; @@ -42,6 +42,6 @@ typedef ucontext64_t breakpad_ucontext_t; #else typedef ucontext_t breakpad_ucontext_t; #define breakpad_uc_mcontext uc_mcontext -#endif // defined(__arm64__) +#endif // defined(__aarch64__) #endif // CLIENT_MAC_HANDLER_UCONTEXT_COMPAT_H_