+/* The libkvm target. */
+
+static const target_info bsd_kvm_target_info = {
+ "kvm",
+ N_("Kernel memory interface"),
+ N_("Use a kernel virtual memory image as a target.\n\
+Optionally specify the filename of a core dump.")
+};
+
+class bsd_kvm_target final : public process_stratum_target
+{
+public:
+ bsd_kvm_target () = default;
+
+ const target_info &info () const override
+ { return bsd_kvm_target_info; }
+
+ void close () override;
+
+ void fetch_registers (struct regcache *, int) override;
+ enum target_xfer_status xfer_partial (enum target_object object,
+ const char *annex,
+ gdb_byte *readbuf,
+ const gdb_byte *writebuf,
+ ULONGEST offset, ULONGEST len,
+ ULONGEST *xfered_len) override;
+
+ void files_info () override;
+ bool thread_alive (ptid_t ptid) override;
+ std::string pid_to_str (ptid_t) override;
+
+ bool has_memory () override { return true; }
+ bool has_stack () override { return true; }
+ bool has_registers () override { return true; }
+};
+
+/* Target ops for libkvm interface. */
+static bsd_kvm_target bsd_kvm_ops;
+