Don't write to inferior_ptid in go32-nat.c
[deliverable/binutils-gdb.git] / gdb / nat / linux-btrace.c
index a63973d569d9e63a3d1536a4c35399f39951deef..b87faf98b2c2db42979b9164d530a8ea2871fd8f 100644 (file)
@@ -1,6 +1,6 @@
 /* Linux-dependent part of branch trace support for GDB, and GDBserver.
 
-   Copyright (C) 2013-2019 Free Software Foundation, Inc.
+   Copyright (C) 2013-2020 Free Software Foundation, Inc.
 
    Contributed by Intel Corp. <markus.t.metzger@intel.com>
 
@@ -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;
@@ -271,11 +274,11 @@ perf_event_sample_ok (const struct perf_event_sample *sample)
    In case the buffer overflows during sampling, one sample may have its lower
    part at the end and its upper part at the beginning of the buffer.  */
 
-static std::vector <btrace_block> *
+static std::vector<btrace_block> *
 perf_event_read_bts (struct btrace_target_info* tinfo, const uint8_t *begin,
                     const uint8_t *end, const uint8_t *start, size_t size)
 {
-  std::vector <btrace_block> *btrace = new std::vector <btrace_block>;
+  std::vector<btrace_block> *btrace = new std::vector<btrace_block>;
   struct perf_event_sample sample;
   size_t read = 0;
   struct btrace_block block = { 0, 0 };
@@ -406,6 +409,9 @@ cpu_supports_bts (void)
 
     case CV_INTEL:
       return intel_supports_bts (&cpu);
+
+    case CV_AMD:
+      return 0;
     }
 }
 
@@ -889,7 +895,7 @@ linux_read_pt (struct btrace_data_pt *btrace,
       return BTRACE_ERR_NONE;
     }
 
-  internal_error (__FILE__, __LINE__, _("Unkown btrace read type."));
+  internal_error (__FILE__, __LINE__, _("Unknown btrace read type."));
 }
 
 /* See linux-btrace.h.  */
This page took 0.02531 seconds and 4 git commands to generate.