Automatic date update in version.in
[deliverable/binutils-gdb.git] / gdb / inf-child.h
index 99173edfbe8b7e939f2a687e142d28dd121a2609..b3e451837c7020ce8f6a4712f0b3d83c7e5678ca 100644 (file)
@@ -1,6 +1,6 @@
 /* Base/prototype target for default child (native) targets.
 
-   Copyright (C) 2004-2018 Free Software Foundation, Inc.
+   Copyright (C) 2004-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 #define INF_CHILD_H
 
 #include "target.h"
+#include "process-stratum-target.h"
 
 /* A prototype child target.  The client can override it with local
    methods.  */
 
 class inf_child_target
-  : public memory_breakpoint_target<target_ops>
+  : public memory_breakpoint_target<process_stratum_target>
 {
 public:
-  inf_child_target ();
+  inf_child_target () = default;
   ~inf_child_target () override = 0;
 
-  const char *shortname () override
-  { return "native"; }
+  const target_info &info () const override;
 
-  const char *longname () override
-  { return _("Native process"); }
-
-  const char *doc () override
-  { return _("Native process (started by the \"run\" command)."); }
-
-  void open (const char *arg, int from_tty) override;
   void close () override;
 
   void disconnect (const char *, int) override;
@@ -54,6 +47,7 @@ public:
   bool supports_terminal_ours () override;
   void terminal_init () override;
   void terminal_inferior () override;
+  void terminal_save_inferior () override;
   void terminal_ours_for_output () override;
   void terminal_ours () override;
   void terminal_info (const char *, int) override;
@@ -65,7 +59,7 @@ public:
 
   void mourn_inferior () override;
 
-  int can_run () override;
+  bool can_run () override;
 
   bool can_create_inferior () override;
   void create_inferior (const char *, const std::string &,
@@ -76,20 +70,8 @@ public:
 
   void post_attach (int) override;
 
-  /* We must default these because they must be implemented by any
-     target that can run.  */
-  int can_async_p () override { return 0; }
-  int supports_non_stop () override { return 0; }
-  int supports_disable_randomization () override { return 0; }
-
   char *pid_to_exec_file (int pid) override;
 
-  int has_all_memory () override;
-  int has_memory () override;
-  int has_stack () override;
-  int has_registers () override;
-  int has_execution (ptid_t) override;
-
   int fileio_open (struct inferior *inf, const char *filename,
                   int flags, int mode, int warn_if_slow,
                   int *target_errno) override;
@@ -105,9 +87,9 @@ public:
   gdb::optional<std::string> fileio_readlink (struct inferior *inf,
                                              const char *filename,
                                              int *target_errno) override;
-  int use_agent (int use) override;
+  bool use_agent (bool use) override;
 
-  int can_use_agent () override;
+  bool can_use_agent () override;
 
 protected:
   /* Unpush the target if it wasn't explicitly open with "target native"
@@ -124,4 +106,13 @@ protected:
 /* This is for native targets which use a unix/POSIX-style waitstatus.  */
 extern void store_waitstatus (struct target_waitstatus *, int);
 
+/* Register TARGET as native target and set it up to respond to the
+   "target native" command.  */
+extern void add_inf_child_target (inf_child_target *target);
+
+/* target_open_ftype callback for inf-child targets.  Used by targets
+   that want to register an alternative target_info object.  Most
+   targets use add_inf_child_target instead.  */
+extern void inf_child_open_target (const char *arg, int from_tty);
+
 #endif
This page took 0.026212 seconds and 4 git commands to generate.