Address additional comments from r1248. Fix the register to check and fix some style nits.

BUG=495
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/834003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1254 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
thestig@chromium.org 2013-12-10 21:17:12 +00:00
parent cd272586ee
commit 7f05071e8b

View file

@ -195,15 +195,15 @@ bool LinuxPtraceDumper::GetThreadInfoByIndex(size_t index, ThreadInfo* info) {
} }
#if defined(__i386) #if defined(__i386)
// Detect if the CPU supports the MMX instructions // Detect if the CPU supports the FXSAVE/FXRSTOR instructions
int eax,ebx,ecx,edx; int eax, ebx, ecx, edx;
__cpuid(1,eax,ebx,ecx,edx); __cpuid(1, eax, ebx, ecx, edx);
if (edx & bit_MMX) { if (edx & bit_FXSAVE) {
if (sys_ptrace(PTRACE_GETFPXREGS, tid, NULL, &info->fpxregs) == -1) { if (sys_ptrace(PTRACE_GETFPXREGS, tid, NULL, &info->fpxregs) == -1) {
return false; return false;
} }
} else { } else {
memset( &info->fpxregs, 0, sizeof(info->fpxregs) ); memset(&info->fpxregs, 0, sizeof(info->fpxregs));
} }
#endif #endif