+class core_target final : public process_stratum_target
+{
+public:
+ core_target ();
+ ~core_target () override;
+
+ const target_info &info () const override
+ { return core_target_info; }
+
+ void close () override;
+ void detach (inferior *, int) 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;
+ const struct target_desc *read_description () override;
+
+ std::string pid_to_str (ptid_t) override;
+
+ const char *thread_name (struct thread_info *) override;
+
+ bool has_all_memory () override { return false; }
+ bool has_memory () override;
+ bool has_stack () override;
+ bool has_registers () override;
+ bool has_execution (ptid_t) override { return false; }
+
+ bool info_proc (const char *, enum info_proc_what) override;
+
+ /* A few helpers. */
+
+ /* Getter, see variable definition. */
+ struct gdbarch *core_gdbarch ()
+ {
+ return m_core_gdbarch;
+ }
+
+ /* See definition. */
+ void get_core_register_section (struct regcache *regcache,
+ const struct regset *regset,
+ const char *name,
+ int section_min_size,
+ int which,
+ const char *human_name,
+ bool required);
+
+private: /* per-core data */
+
+ /* The core's section table. Note that these target sections are
+ *not* mapped in the current address spaces' set of target
+ sections --- those should come only from pure executable or
+ shared library bfds. The core bfd sections are an implementation
+ detail of the core target, just like ptrace is for unix child
+ targets. */
+ target_section_table m_core_section_table {};
+
+ /* The core_fns for a core file handler that is prepared to read the
+ core file currently open on core_bfd. */
+ core_fns *m_core_vec = NULL;
+
+ /* FIXME: kettenis/20031023: Eventually this field should
+ disappear. */
+ struct gdbarch *m_core_gdbarch = NULL;
+};