2005-01-18 Andrew Cagney <cagney@gnu.org>
authorAndrew Cagney <cagney@redhat.com>
Tue, 18 Jan 2005 17:04:28 +0000 (17:04 +0000)
committerAndrew Cagney <cagney@redhat.com>
Tue, 18 Jan 2005 17:04:28 +0000 (17:04 +0000)
* target.h (struct target_ops): Change return type of
to_insert_fork_catchpoint, to_insert_vfork_catchpoint and
to_insert_exec_catchpoint to void.
(child_insert_fork_catchpoint, child_insert_vfork_catchpoint)
(child_insert_exec_catchpoint): Change return type to void.
* target.c (update_current_target): Update.
(debug_to_insert_fork_catchpoint)
(debug_to_insert_vfork_catchpoint)
(debug_to_insert_exec_catchpoint): Update.
* inf-child.c (inf_child_insert_fork_catchpoint)
(inf_child_insert_vfork_catchpoint)
(inf_child_insert_exec_catchpoint): Update.
* breakpoint.c (insert_catchpoint): Update, do not throw an error.
* linux-nat.c (child_insert_fork_catchpoint)
(child_insert_vfork_catchpoint)
(child_insert_exec_catchpoint): Update.
* inftarg.c (child_insert_fork_catchpoint)
(child_insert_vfork_catchpoint,)
(child_insert_exec_catchpoint): Update.

gdb/ChangeLog
gdb/breakpoint.c
gdb/inf-child.c
gdb/inftarg.c
gdb/linux-nat.c
gdb/target.c
gdb/target.h

index eaba387..0f3cd0a 100644 (file)
@@ -1,5 +1,25 @@
 2005-01-18  Andrew Cagney  <cagney@gnu.org>
 
+       * target.h (struct target_ops): Change return type of
+       to_insert_fork_catchpoint, to_insert_vfork_catchpoint and
+       to_insert_exec_catchpoint to void.
+       (child_insert_fork_catchpoint, child_insert_vfork_catchpoint)
+       (child_insert_exec_catchpoint): Change return type to void.
+       * target.c (update_current_target): Update.
+       (debug_to_insert_fork_catchpoint) 
+       (debug_to_insert_vfork_catchpoint) 
+       (debug_to_insert_exec_catchpoint): Update.
+       * inf-child.c (inf_child_insert_fork_catchpoint) 
+       (inf_child_insert_vfork_catchpoint) 
+       (inf_child_insert_exec_catchpoint): Update.
+       * breakpoint.c (insert_catchpoint): Update, do not throw an error.
+       * linux-nat.c (child_insert_fork_catchpoint) 
+       (child_insert_vfork_catchpoint)
+       (child_insert_exec_catchpoint): Update.
+       * inftarg.c (child_insert_fork_catchpoint) 
+       (child_insert_vfork_catchpoint,)
+       (child_insert_exec_catchpoint): Update.
+
        * remote.c (remote_open_1): Use throw_exception.
 
 2005-01-17  Michael Snyder  <msnyder@redhat.com>
index 690ec5d..3c0e885 100644 (file)
@@ -718,21 +718,18 @@ insert_catchpoint (struct ui_out *uo, void *args)
   switch (b->type)
     {
     case bp_catch_fork:
-      val = target_insert_fork_catchpoint (PIDGET (inferior_ptid));
+      target_insert_fork_catchpoint (PIDGET (inferior_ptid));
       break;
     case bp_catch_vfork:
-      val = target_insert_vfork_catchpoint (PIDGET (inferior_ptid));
+      target_insert_vfork_catchpoint (PIDGET (inferior_ptid));
       break;
     case bp_catch_exec:
-      val = target_insert_exec_catchpoint (PIDGET (inferior_ptid));
+      target_insert_exec_catchpoint (PIDGET (inferior_ptid));
       break;
     default:
       internal_error (__FILE__, __LINE__, "unknown breakpoint type");
       break;
     }
-
-  if (val < 0)
-    throw_reason (RETURN_ERROR);
 }
 
 /* Helper routine: free the value chain for a breakpoint (watchpoint).  */
index ebc6c62..b0d9c69 100644 (file)
@@ -90,12 +90,11 @@ inf_child_acknowledge_created_inferior (int pid)
      created inferior" operation by a debugger.  */
 }
 
-static int
+static void
 inf_child_insert_fork_catchpoint (int pid)
 {
   /* This version of Unix doesn't support notification of fork
      events.  */
-  return 0;
 }
 
 static int
@@ -106,12 +105,11 @@ inf_child_remove_fork_catchpoint (int pid)
   return 0;
 }
 
-static int
+static void
 inf_child_insert_vfork_catchpoint (int pid)
 {
   /* This version of Unix doesn't support notification of vfork
      events.  */
-  return 0;
 }
 
 static int
@@ -130,12 +128,11 @@ inf_child_follow_fork (int follow_child)
   return 0;
 }
 
-static int
+static void
 inf_child_insert_exec_catchpoint (int pid)
 {
   /* This version of Unix doesn't support notification of exec
      events.  */
-  return 0;
 }
 
 static int
index 2c5de8f..2f04365 100644 (file)
@@ -364,11 +364,11 @@ child_acknowledge_created_inferior (int pid)
 
 
 #if !defined(CHILD_INSERT_FORK_CATCHPOINT)
-int
+void
 child_insert_fork_catchpoint (int pid)
 {
-  /* This version of Unix doesn't support notification of fork events.  */
-  return 0;
+  /* This version of Unix doesn't support notification of fork
+     events.  */
 }
 #endif
 
@@ -382,11 +382,11 @@ child_remove_fork_catchpoint (int pid)
 #endif
 
 #if !defined(CHILD_INSERT_VFORK_CATCHPOINT)
-int
+void
 child_insert_vfork_catchpoint (int pid)
 {
-  /* This version of Unix doesn't support notification of vfork events.  */
-  return 0;
+  /* This version of Unix doesn't support notification of vfork
+     events.  */
 }
 #endif
 
@@ -409,11 +409,11 @@ child_follow_fork (int follow_child)
 #endif
 
 #if !defined(CHILD_INSERT_EXEC_CATCHPOINT)
-int
+void
 child_insert_exec_catchpoint (int pid)
 {
-  /* This version of Unix doesn't support notification of exec events.  */
-  return 0;
+  /* This version of Unix doesn't support notification of exec
+     events.  */
 }
 #endif
 
index a6f389e..6cee9c8 100644 (file)
@@ -521,31 +521,25 @@ linux_handle_extended_wait (int pid, int status,
 }
 
 \f
-int
+void
 child_insert_fork_catchpoint (int pid)
 {
   if (! linux_supports_tracefork (pid))
     error ("Your system does not support fork catchpoints.");
-
-  return 0;
 }
 
-int
+void
 child_insert_vfork_catchpoint (int pid)
 {
   if (!linux_supports_tracefork (pid))
     error ("Your system does not support vfork catchpoints.");
-
-  return 0;
 }
 
-int
+void
 child_insert_exec_catchpoint (int pid)
 {
   if (!linux_supports_tracefork (pid))
     error ("Your system does not support exec catchpoints.");
-
-  return 0;
 }
 
 void
index 81389a7..bade14c 100644 (file)
@@ -566,13 +566,13 @@ update_current_target (void)
            (void (*) (int)) 
            target_ignore);
   de_fault (to_insert_fork_catchpoint, 
-           (int (*) (int)) 
+           (void (*) (int)) 
            tcomplain);
   de_fault (to_remove_fork_catchpoint, 
            (int (*) (int)) 
            tcomplain);
   de_fault (to_insert_vfork_catchpoint, 
-           (int (*) (int)) 
+           (void (*) (int)) 
            tcomplain);
   de_fault (to_remove_vfork_catchpoint, 
            (int (*) (int)) 
@@ -581,7 +581,7 @@ update_current_target (void)
            (int (*) (int)) 
            target_ignore);
   de_fault (to_insert_exec_catchpoint, 
-           (int (*) (int)) 
+           (void (*) (int)) 
            tcomplain);
   de_fault (to_remove_exec_catchpoint, 
            (int (*) (int)) 
@@ -2257,17 +2257,13 @@ debug_to_acknowledge_created_inferior (int pid)
                      pid);
 }
 
-static int
+static void
 debug_to_insert_fork_catchpoint (int pid)
 {
-  int retval;
-
-  retval = debug_target.to_insert_fork_catchpoint (pid);
-
-  fprintf_unfiltered (gdb_stdlog, "target_insert_fork_catchpoint (%d) = %d\n",
-                     pid, retval);
+  debug_target.to_insert_fork_catchpoint (pid);
 
-  return retval;
+  fprintf_unfiltered (gdb_stdlog, "target_insert_fork_catchpoint (%d)\n",
+                     pid);
 }
 
 static int
@@ -2283,17 +2279,13 @@ debug_to_remove_fork_catchpoint (int pid)
   return retval;
 }
 
-static int
+static void
 debug_to_insert_vfork_catchpoint (int pid)
 {
-  int retval;
-
-  retval = debug_target.to_insert_vfork_catchpoint (pid);
-
-  fprintf_unfiltered (gdb_stdlog, "target_insert_vfork_catchpoint (%d)= %d\n",
-                     pid, retval);
+  debug_target.to_insert_vfork_catchpoint (pid);
 
-  return retval;
+  fprintf_unfiltered (gdb_stdlog, "target_insert_vfork_catchpoint (%d)\n",
+                     pid);
 }
 
 static int
@@ -2320,17 +2312,13 @@ debug_to_follow_fork (int follow_child)
   return retval;
 }
 
-static int
+static void
 debug_to_insert_exec_catchpoint (int pid)
 {
-  int retval;
+  debug_target.to_insert_exec_catchpoint (pid);
 
-  retval = debug_target.to_insert_exec_catchpoint (pid);
-
-  fprintf_unfiltered (gdb_stdlog, "target_insert_exec_catchpoint (%d) = %d\n",
-                     pid, retval);
-
-  return retval;
+  fprintf_unfiltered (gdb_stdlog, "target_insert_exec_catchpoint (%d)\n",
+                     pid);
 }
 
 static int
index a7016bd..9665ade 100644 (file)
@@ -358,12 +358,12 @@ struct target_ops
     void (*to_create_inferior) (char *, char *, char **, int);
     void (*to_post_startup_inferior) (ptid_t);
     void (*to_acknowledge_created_inferior) (int);
-    int (*to_insert_fork_catchpoint) (int);
+    void (*to_insert_fork_catchpoint) (int);
     int (*to_remove_fork_catchpoint) (int);
-    int (*to_insert_vfork_catchpoint) (int);
+    void (*to_insert_vfork_catchpoint) (int);
     int (*to_remove_vfork_catchpoint) (int);
     int (*to_follow_fork) (int);
-    int (*to_insert_exec_catchpoint) (int);
+    void (*to_insert_exec_catchpoint) (int);
     int (*to_remove_exec_catchpoint) (int);
     int (*to_reported_exec_events_per_exec_call) (void);
     int (*to_has_exited) (int, int, int *);
@@ -571,11 +571,11 @@ extern void child_post_startup_inferior (ptid_t);
 
 extern void child_acknowledge_created_inferior (int);
 
-extern int child_insert_fork_catchpoint (int);
+extern void child_insert_fork_catchpoint (int);
 
 extern int child_remove_fork_catchpoint (int);
 
-extern int child_insert_vfork_catchpoint (int);
+extern void child_insert_vfork_catchpoint (int);
 
 extern int child_remove_vfork_catchpoint (int);
 
@@ -583,7 +583,7 @@ extern void child_acknowledge_created_inferior (int);
 
 extern int child_follow_fork (int);
 
-extern int child_insert_exec_catchpoint (int);
+extern void child_insert_exec_catchpoint (int);
 
 extern int child_remove_exec_catchpoint (int);