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>
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). */
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
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
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
#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
#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
#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
}
\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
(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))
(int (*) (int))
target_ignore);
de_fault (to_insert_exec_catchpoint,
- (int (*) (int))
+ (void (*) (int))
tcomplain);
de_fault (to_remove_exec_catchpoint,
(int (*) (int))
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
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
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
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 *);
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);
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);