From 3c613e7bdb56b6c7527acedc94e21db13adb06e4 Mon Sep 17 00:00:00 2001 From: "thestig@chromium.org" Date: Sat, 14 Dec 2013 19:17:42 +0000 Subject: Fix gcc vs clang cpuid.h discrepency. For r1254, gcc defines bit_FXSAVE while clang defines bit_FXSR. R=mark@chromium.org Review URL: https://breakpad.appspot.com/924002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1260 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/linux/minidump_writer/linux_ptrace_dumper.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/client/linux/minidump_writer') diff --git a/src/client/linux/minidump_writer/linux_ptrace_dumper.cc b/src/client/linux/minidump_writer/linux_ptrace_dumper.cc index 5ea3bd54..8b96037e 100644 --- a/src/client/linux/minidump_writer/linux_ptrace_dumper.cc +++ b/src/client/linux/minidump_writer/linux_ptrace_dumper.cc @@ -195,6 +195,9 @@ bool LinuxPtraceDumper::GetThreadInfoByIndex(size_t index, ThreadInfo* info) { } #if defined(__i386) +#if !defined(bit_FXSAVE) // e.g. Clang +#define bit_FXSAVE bit_FXSR +#endif // Detect if the CPU supports the FXSAVE/FXRSTOR instructions int eax, ebx, ecx, edx; __cpuid(1, eax, ebx, ecx, edx); @@ -205,7 +208,7 @@ bool LinuxPtraceDumper::GetThreadInfoByIndex(size_t index, ThreadInfo* info) { } else { memset(&info->fpxregs, 0, sizeof(info->fpxregs)); } -#endif +#endif // defined(__i386) #if defined(__i386) || defined(__x86_64) for (unsigned i = 0; i < ThreadInfo::kNumDebugRegisters; ++i) { -- cgit v1.2.1