diff --git a/src/client/linux/minidump_writer/linux_ptrace_dumper.cc b/src/client/linux/minidump_writer/linux_ptrace_dumper.cc index 3256f532..0a537a8b 100644 --- a/src/client/linux/minidump_writer/linux_ptrace_dumper.cc +++ b/src/client/linux/minidump_writer/linux_ptrace_dumper.cc @@ -40,6 +40,7 @@ #include #include +#include #include #include #include @@ -191,8 +192,16 @@ bool LinuxPtraceDumper::GetThreadInfoByIndex(size_t index, ThreadInfo* info) { } #if defined(__i386) - if (sys_ptrace(PTRACE_GETFPXREGS, tid, NULL, &info->fpxregs) == -1) - return false; + // Detect if the CPU supports the MMX instructions + int eax,ebx,ecx,edx; + __cpuid(1,eax,ebx,ecx,edx); + if (edx & bit_MMX) { + if (sys_ptrace(PTRACE_GETFPXREGS, tid, NULL, &info->fpxregs) == -1) { + return false; + } + } else { + memset( &info->fpxregs, 0, sizeof(info->fpxregs) ); + } #endif #if defined(__i386) || defined(__x86_64)