gdb, btrace: fix family and model computation
In gdb/nat/linux-btrace.c:btrace_this_cpu() we initialize the cpu structure given to the libipt btrace decoder. We only consider the extended model field for family 0x6 and forget about family 0xf and we don't consider the extended family field. Fix it.
This commit is contained in:
parent
56d4450bdf
commit
d9757bcd43
1 changed files with 4 additions and 2 deletions
|
@ -84,9 +84,11 @@ btrace_this_cpu (void)
|
|||
cpu.vendor = CV_INTEL;
|
||||
|
||||
cpu.family = (cpuid >> 8) & 0xf;
|
||||
cpu.model = (cpuid >> 4) & 0xf;
|
||||
if (cpu.family == 0xf)
|
||||
cpu.family += (cpuid >> 20) & 0xff;
|
||||
|
||||
if (cpu.family == 0x6)
|
||||
cpu.model = (cpuid >> 4) & 0xf;
|
||||
if ((cpu.family == 0x6) || ((cpu.family & 0xf) == 0xf))
|
||||
cpu.model += (cpuid >> 12) & 0xf0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue