Fix "enumeration values not handled in switch" error in testsuite
[deliverable/binutils-gdb.git] / gdb / target-delegates.c
index cfc0ce06e998a3510bf8d5d4959cc646b542b075..c28af097183d5bd628879e92eb9824354451edd9 100644 (file)
@@ -56,10 +56,10 @@ struct dummy_target : public target_ops
   int remove_fork_catchpoint (int arg0) override;
   int insert_vfork_catchpoint (int arg0) override;
   int remove_vfork_catchpoint (int arg0) override;
-  int follow_fork (int arg0, int arg1) override;
+  bool follow_fork (bool arg0, bool arg1) override;
   int insert_exec_catchpoint (int arg0) override;
   int remove_exec_catchpoint (int arg0) override;
-  void follow_exec (struct inferior *arg0, char *arg1) override;
+  void follow_exec (struct inferior *arg0, const char *arg1) override;
   int set_syscall_catchpoint (int arg0, bool arg1, int arg2, gdb::array_view<const int> arg3) override;
   void mourn_inferior () override;
   void pass_signals (gdb::array_view<const unsigned char> arg0) override;
@@ -83,6 +83,7 @@ struct dummy_target : public target_ops
   bool can_async_p () override;
   bool is_async_p () override;
   void async (int arg0) override;
+  int async_wait_fd () override;
   void thread_events (int arg0) override;
   bool supports_non_stop () override;
   bool always_non_stop_p () override;
@@ -224,10 +225,10 @@ struct debug_target : public target_ops
   int remove_fork_catchpoint (int arg0) override;
   int insert_vfork_catchpoint (int arg0) override;
   int remove_vfork_catchpoint (int arg0) override;
-  int follow_fork (int arg0, int arg1) override;
+  bool follow_fork (bool arg0, bool arg1) override;
   int insert_exec_catchpoint (int arg0) override;
   int remove_exec_catchpoint (int arg0) override;
-  void follow_exec (struct inferior *arg0, char *arg1) override;
+  void follow_exec (struct inferior *arg0, const char *arg1) override;
   int set_syscall_catchpoint (int arg0, bool arg1, int arg2, gdb::array_view<const int> arg3) override;
   void mourn_inferior () override;
   void pass_signals (gdb::array_view<const unsigned char> arg0) override;
@@ -251,6 +252,7 @@ struct debug_target : public target_ops
   bool can_async_p () override;
   bool is_async_p () override;
   void async (int arg0) override;
+  int async_wait_fd () override;
   void thread_events (int arg0) override;
   bool supports_non_stop () override;
   bool always_non_stop_p () override;
@@ -1504,30 +1506,30 @@ debug_target::remove_vfork_catchpoint (int arg0)
   return result;
 }
 
-int
-target_ops::follow_fork (int arg0, int arg1)
+bool
+target_ops::follow_fork (bool arg0, bool arg1)
 {
   return this->beneath ()->follow_fork (arg0, arg1);
 }
 
-int
-dummy_target::follow_fork (int arg0, int arg1)
+bool
+dummy_target::follow_fork (bool arg0, bool arg1)
 {
   return default_follow_fork (this, arg0, arg1);
 }
 
-int
-debug_target::follow_fork (int arg0, int arg1)
+bool
+debug_target::follow_fork (bool arg0, bool arg1)
 {
-  int result;
+  bool result;
   fprintf_unfiltered (gdb_stdlog, "-> %s->follow_fork (...)\n", this->beneath ()->shortname ());
   result = this->beneath ()->follow_fork (arg0, arg1);
   fprintf_unfiltered (gdb_stdlog, "<- %s->follow_fork (", this->beneath ()->shortname ());
-  target_debug_print_int (arg0);
+  target_debug_print_bool (arg0);
   fputs_unfiltered (", ", gdb_stdlog);
-  target_debug_print_int (arg1);
+  target_debug_print_bool (arg1);
   fputs_unfiltered (") = ", gdb_stdlog);
-  target_debug_print_int (result);
+  target_debug_print_bool (result);
   fputs_unfiltered ("\n", gdb_stdlog);
   return result;
 }
@@ -1585,25 +1587,25 @@ debug_target::remove_exec_catchpoint (int arg0)
 }
 
 void
-target_ops::follow_exec (struct inferior *arg0, char *arg1)
+target_ops::follow_exec (struct inferior *arg0, const char *arg1)
 {
   this->beneath ()->follow_exec (arg0, arg1);
 }
 
 void
-dummy_target::follow_exec (struct inferior *arg0, char *arg1)
+dummy_target::follow_exec (struct inferior *arg0, const char *arg1)
 {
 }
 
 void
-debug_target::follow_exec (struct inferior *arg0, char *arg1)
+debug_target::follow_exec (struct inferior *arg0, const char *arg1)
 {
   fprintf_unfiltered (gdb_stdlog, "-> %s->follow_exec (...)\n", this->beneath ()->shortname ());
   this->beneath ()->follow_exec (arg0, arg1);
   fprintf_unfiltered (gdb_stdlog, "<- %s->follow_exec (", this->beneath ()->shortname ());
   target_debug_print_struct_inferior_p (arg0);
   fputs_unfiltered (", ", gdb_stdlog);
-  target_debug_print_char_p (arg1);
+  target_debug_print_const_char_p (arg1);
   fputs_unfiltered (")\n", gdb_stdlog);
 }
 
@@ -2162,6 +2164,31 @@ debug_target::async (int arg0)
   fputs_unfiltered (")\n", gdb_stdlog);
 }
 
+int
+target_ops::async_wait_fd ()
+{
+  return this->beneath ()->async_wait_fd ();
+}
+
+int
+dummy_target::async_wait_fd ()
+{
+  noprocess ();
+}
+
+int
+debug_target::async_wait_fd ()
+{
+  int result;
+  fprintf_unfiltered (gdb_stdlog, "-> %s->async_wait_fd (...)\n", this->beneath ()->shortname ());
+  result = this->beneath ()->async_wait_fd ();
+  fprintf_unfiltered (gdb_stdlog, "<- %s->async_wait_fd (", this->beneath ()->shortname ());
+  fputs_unfiltered (") = ", gdb_stdlog);
+  target_debug_print_int (result);
+  fputs_unfiltered ("\n", gdb_stdlog);
+  return result;
+}
+
 void
 target_ops::thread_events (int arg0)
 {
This page took 0.027184 seconds and 4 git commands to generate.