Remove ARI check for multiple calls to warning or error
[deliverable/binutils-gdb.git] / gdb / bsd-kvm.c
index af8305f3867b58f269c4e9c59b6a6fd77780f3ef..21f978728da629ef3569f996af9cfe7aa12fe8f6 100644 (file)
@@ -1,6 +1,6 @@
 /* BSD Kernel Data Access Library (libkvm) interface.
 
-   Copyright (C) 2004-2018 Free Software Foundation, Inc.
+   Copyright (C) 2004-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -24,6 +24,7 @@
 #include "frame.h"
 #include "regcache.h"
 #include "target.h"
+#include "process-stratum-target.h"
 #include "value.h"
 #include "gdbcore.h"
 #include "inferior.h"          /* for get_exec_file */
@@ -71,11 +72,10 @@ static const target_info bsd_kvm_target_info = {
 Optionally specify the filename of a core dump.")
 };
 
-class bsd_kvm_target final : public target_ops
+class bsd_kvm_target final : public process_stratum_target
 {
 public:
-  bsd_kvm_target ()
-  { this->to_stratum = process_stratum; }
+  bsd_kvm_target () = default;
 
   const target_info &info () const override
   { return bsd_kvm_target_info; }
@@ -92,7 +92,7 @@ public:
 
   void files_info () override;
   bool thread_alive (ptid_t ptid) override;
-  const char *pid_to_str (ptid_t) override;
+  std::string pid_to_str (ptid_t) override;
 
   bool has_memory () override { return true; }
   bool has_stack () override { return true; }
@@ -368,12 +368,10 @@ bsd_kvm_target::thread_alive (ptid_t ptid)
   return true;
 }
 
-const char *
+std::string
 bsd_kvm_target::pid_to_str (ptid_t ptid)
 {
-  static char buf[64];
-  xsnprintf (buf, sizeof buf, "<kvm>");
-  return buf;
+  return "<kvm>";
 }
 
 /* Add the libkvm interface to the list of all possible targets and
This page took 0.024754 seconds and 4 git commands to generate.