diff options
author | Brian Sheedy <bsheedy@chromium.org> | 2021-09-07 13:45:56 -0700 |
---|---|---|
committer | Joshua Peraza <jperaza@chromium.org> | 2021-09-07 20:52:52 +0000 |
commit | 1e093103ca79d862884471e0d3351d976fe4b6f5 (patch) | |
tree | 7bd9c206b78c8f846a39c0ff20df01bb2fdee486 | |
parent | 4722484bf69875fcf1132023f997cba9fc7bed16 (diff) | |
download | google-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.cc | 7 |
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)) { |