diff options
Diffstat (limited to 'src/client/linux/minidump_writer/linux_ptrace_dumper.cc')
-rw-r--r-- | src/client/linux/minidump_writer/linux_ptrace_dumper.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/client/linux/minidump_writer/linux_ptrace_dumper.cc b/src/client/linux/minidump_writer/linux_ptrace_dumper.cc index 718fab7c..2adc39e1 100644 --- a/src/client/linux/minidump_writer/linux_ptrace_dumper.cc +++ b/src/client/linux/minidump_writer/linux_ptrace_dumper.cc @@ -35,6 +35,10 @@ // rules apply as detailed at the top of minidump_writer.h: no libc calls and // use the alternative allocator. +#ifdef HAVE_CONFIG_H +#include <config.h> // Must come first +#endif + #include "client/linux/minidump_writer/linux_ptrace_dumper.h" #include <asm/ptrace.h> @@ -175,6 +179,13 @@ bool LinuxPtraceDumper::ReadRegisters(ThreadInfo* info, pid_t tid) { return false; } + // When running on arm processors the binary may be built with softfp or + // hardfp. If built with softfp we have no hardware registers to read from, + // so the following read will always fail. gcc defines __SOFTFP__ macro, + // clang13 does not do so. see: https://reviews.llvm.org/D135680. + // If you are using clang and the macro is NOT defined, please include the + // macro define for applicable targets. +#if !defined(__SOFTFP__) #if !(defined(__ANDROID__) && defined(__ARM_EABI__)) // When running an arm build on an arm64 device, attempting to get the // floating point registers fails. On Android, the floating point registers @@ -186,6 +197,7 @@ bool LinuxPtraceDumper::ReadRegisters(ThreadInfo* info, pid_t tid) { return false; } #endif // !(defined(__ANDROID__) && defined(__ARM_EABI__)) +#endif // !defined(__SOFTFP__) return true; #else // PTRACE_GETREGS return false; |