aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/nat/linux-btrace.c6
-rw-r--r--gdbsupport/ChangeLog4
-rw-r--r--gdbsupport/btrace-common.h5
4 files changed, 20 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 42118e7..44ccc18 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2020-05-14 Kevin Buettner <kevinb@redhat.com>
+
+ * nat/linux-btrace.c (btrace_this_cpu): Add check for AMD
+ processors.
+ (cpu_supports_bts): Add CV_AMD case.
+
2020-05-14 Laurent Morichetti <Laurent.Morichetti@amd.com>
Simon Marchi <simon.marchi@efficios.com>
diff --git a/gdb/nat/linux-btrace.c b/gdb/nat/linux-btrace.c
index e972a07..b87faf9 100644
--- a/gdb/nat/linux-btrace.c
+++ b/gdb/nat/linux-btrace.c
@@ -90,6 +90,9 @@ btrace_this_cpu (void)
cpu.model += (cpuid >> 12) & 0xf0;
}
}
+ else if (ebx == signature_AMD_ebx && ecx == signature_AMD_ecx
+ && edx == signature_AMD_edx)
+ cpu.vendor = CV_AMD;
}
return cpu;
@@ -406,6 +409,9 @@ cpu_supports_bts (void)
case CV_INTEL:
return intel_supports_bts (&cpu);
+
+ case CV_AMD:
+ return 0;
}
}
diff --git a/gdbsupport/ChangeLog b/gdbsupport/ChangeLog
index 636a3d3..e7374ab 100644
--- a/gdbsupport/ChangeLog
+++ b/gdbsupport/ChangeLog
@@ -1,3 +1,7 @@
+2020-05-14 Kevin Buettner <kevinb@redhat.com>
+
+ * btrace-common.h (btrace_cpu_vendor): Add CV_AMD.
+
2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
* common-regcache.h (regcache_read_pc_protected): New function
diff --git a/gdbsupport/btrace-common.h b/gdbsupport/btrace-common.h
index c9dc683..226c67b 100644
--- a/gdbsupport/btrace-common.h
+++ b/gdbsupport/btrace-common.h
@@ -74,7 +74,10 @@ enum btrace_cpu_vendor
CV_UNKNOWN,
/* Intel. */
- CV_INTEL
+ CV_INTEL,
+
+ /* AMD. */
+ CV_AMD
};
/* A cpu identifier. */