Add `set print array-indexes' tests for C/C++ arrays
[binutils-gdb.git] / gdb / inf-child.h
index 6316f3062da106d9257b23319509770cb821e2fa..a017032a32f0353e846c9ff05882b6a268d58933 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-2022 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 target_info &info () const override;
@@ -46,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;
@@ -53,7 +55,8 @@ public:
   void interrupt () override;
   void pass_ctrlc () override;
 
-  void post_startup_inferior (ptid_t) override;
+  void follow_exec (inferior *follow_inf, ptid_t ptid,
+                   const char *execd_pathname) override;
 
   void mourn_inferior () override;
 
@@ -68,20 +71,8 @@ public:
 
   void post_attach (int) override;
 
-  /* We must default these because they must be implemented by any
-     target that can run.  */
-  bool can_async_p ()  override { return false; }
-  bool supports_non_stop ()  override { return false; }
-  bool supports_disable_randomization () override { return false; }
-
   char *pid_to_exec_file (int pid) override;
 
-  bool has_all_memory () override;
-  bool has_memory () override;
-  bool has_stack () override;
-  bool has_registers () override;
-  bool 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;
@@ -111,10 +102,9 @@ protected:
   void maybe_unpush_target ();
 };
 
-/* Functions for helping to write a native target.  */
+/* Convert the host wait(2) status to a target_waitstatus.  */
 
-/* This is for native targets which use a unix/POSIX-style waitstatus.  */
-extern void store_waitstatus (struct target_waitstatus *, int);
+extern target_waitstatus host_status_to_waitstatus (int hoststatus);
 
 /* Register TARGET as native target and set it up to respond to the
    "target native" command.  */