diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-06-21 15:40:18 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-06-21 15:40:18 +0000 |
commit | 7a55df68b203148e593daea04b5d6af075e095e9 (patch) | |
tree | d5c23484fd569ec581b489c7fc4daf9532199ac9 /gdb/common | |
parent | 60d1bdf1b1fc948fd8c35d73d51798a211176122 (diff) | |
download | gdb-7a55df68b203148e593daea04b5d6af075e095e9.tar.gz |
gdb/
* common/linux-btrace.c (cpu_supports_btrace): Remove variable vendor,
replace strcmp with signature_INTEL_ebx, signature_INTEL_ecx and
signature_INTEL_edx comparisons.
Diffstat (limited to 'gdb/common')
-rw-r--r-- | gdb/common/linux-btrace.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/gdb/common/linux-btrace.c b/gdb/common/linux-btrace.c index 0ec13bbb029..b874c847a96 100644 --- a/gdb/common/linux-btrace.c +++ b/gdb/common/linux-btrace.c @@ -382,17 +382,12 @@ static int cpu_supports_btrace (void) { unsigned int ebx, ecx, edx; - char vendor[13]; if (!i386_cpuid (0, NULL, &ebx, &ecx, &edx)) return 0; - memcpy (&vendor[0], &ebx, 4); - memcpy (&vendor[4], &ecx, 4); - memcpy (&vendor[8], &edx, 4); - vendor[12] = '\0'; - - if (strcmp (vendor, "GenuineIntel") == 0) + if (ebx == signature_INTEL_ebx && ecx == signature_INTEL_ecx + && edx == signature_INTEL_edx) return intel_supports_btrace (); /* Don't know about others. Let's assume they do. */ |