From 9dcc03f47d10a9b34fbeb80fcb4d2fce968a5c67 Mon Sep 17 00:00:00 2001 From: "ted.mielczarek" Date: Mon, 14 Dec 2009 11:47:53 +0000 Subject: Mozilla bug 532713 - OS X client code doesn't decoded extended family ids in CPU info. Patch by Jeff Muizelaar , r=me git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@440 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/mac/handler/minidump_generator.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/client/mac/handler') diff --git a/src/client/mac/handler/minidump_generator.cc b/src/client/mac/handler/minidump_generator.cc index e91a3952..f8dc8eaa 100644 --- a/src/client/mac/handler/minidump_generator.cc +++ b/src/client/mac/handler/minidump_generator.cc @@ -637,6 +637,7 @@ bool MinidumpGenerator::WriteSystemInfoStream( // get version and feature info cpuid(1, info_ptr->cpu.x86_cpu_info.version_information, unused, unused2, info_ptr->cpu.x86_cpu_info.feature_information); + // family info_ptr->processor_level = (info_ptr->cpu.x86_cpu_info.version_information & 0xF00) >> 8; @@ -644,6 +645,20 @@ bool MinidumpGenerator::WriteSystemInfoStream( info_ptr->processor_revision = (info_ptr->cpu.x86_cpu_info.version_information & 0xF) | ((info_ptr->cpu.x86_cpu_info.version_information & 0xF0) << 4); + + // decode extended model info + if (info_ptr->processor_level == 0xF || + info_ptr->processor_level == 0x6) { + info_ptr->processor_revision |= + ((info_ptr->cpu.x86_cpu_info.version_information & 0xF0000) >> 4); + } + + // decode extended family info + if (info_ptr->processor_level == 0xF) { + info_ptr->processor_level += + ((info_ptr->cpu.x86_cpu_info.version_information & 0xFF00000) >> 20); + } + #endif // __i386__ break; default: -- cgit v1.2.1