diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-06-21 15:40:19 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-06-21 15:40:19 +0000 |
commit | 4353c9e6f6e063a96d46cc6bea14d7d20d369407 (patch) | |
tree | 53f7465ce21dfc2e5a20f32df1eec0771d284460 /gdb | |
parent | 34c911a458060dc30f1745f898f788d547d5f390 (diff) | |
download | fsf-binutils-gdb-4353c9e6f6e063a96d46cc6bea14d7d20d369407.zip fsf-binutils-gdb-4353c9e6f6e063a96d46cc6bea14d7d20d369407.tar.gz fsf-binutils-gdb-4353c9e6f6e063a96d46cc6bea14d7d20d369407.tar.bz2 |
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')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/common/linux-btrace.c | 9 |
2 files changed, 8 insertions, 7 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bb5f2fb..a8fae71 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2013-06-21 Jan Kratochvil <jan.kratochvil@redhat.com> + + * common/linux-btrace.c (cpu_supports_btrace): Remove variable vendor, + replace strcmp with signature_INTEL_ebx, signature_INTEL_ecx and + signature_INTEL_edx comparisons. + 2013-06-20 Doug Evans <dje@google.com> symtab/15652 diff --git a/gdb/common/linux-btrace.c b/gdb/common/linux-btrace.c index 0ec13bb..b874c84 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. */ |