aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Sheedy <bsheedy@chromium.org>2021-09-07 13:45:56 -0700
committerJoshua Peraza <jperaza@chromium.org>2021-09-07 20:52:52 +0000
commit1e093103ca79d862884471e0d3351d976fe4b6f5 (patch)
tree7bd9c206b78c8f846a39c0ff20df01bb2fdee486
parent4722484bf69875fcf1132023f997cba9fc7bed16 (diff)
downloadgoogle-breakpad-1e093103ca79d862884471e0d3351d976fe4b6f5.tar.gz
Workaround Mac arch issue
Temporarily works around an issue on Mac where the system version of NXGetLocalArchInfo is returning x86 information on x86_64 devices, which results in dump_syms failing on said devices. Instead, the Breakpad implementation of NXGetLocalArchInfo, which is meant for dump_syms_mac on Linux, will be used until the system version is fixed. Bug: 1242776 Change-Id: Id398338e580eb9c67c61f9f01670d2e7dbe86bea Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3143524 Reviewed-by: Joshua Peraza <jperaza@chromium.org>
-rw-r--r--src/common/mac/arch_utilities.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/common/mac/arch_utilities.cc b/src/common/mac/arch_utilities.cc
index c0e4bac5..6d06e6bd 100644
--- a/src/common/mac/arch_utilities.cc
+++ b/src/common/mac/arch_utilities.cc
@@ -130,7 +130,10 @@ const NXArchInfo* BreakpadGetArchInfoFromCpuType(cpu_type_t cpu_type,
} // namespace google_breakpad
-#ifndef __APPLE__
+// TODO(crbug.com/1242776): The "#ifndef __APPLE__" should be here, but the
+// system version of NXGetLocalArchInfo returns incorrect information on
+// x86_64 machines (treating them as just x86), so use the Breakpad version
+// all the time for now.
namespace {
enum Architecture {
@@ -219,6 +222,8 @@ const NXArchInfo *NXGetLocalArchInfo(void) {
return &kKnownArchitectures[arch];
}
+#ifndef __APPLE__
+
const NXArchInfo *NXGetArchInfoFromName(const char *name) {
for (int arch = 0; arch < kNumArchitectures; ++arch) {
if (!strcmp(name, kKnownArchitectures[arch].name)) {