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.
This commit is contained in:
Andrew Cagney 2005-01-18 17:04:28 +00:00
parent 9ee907e0a0
commit fa113d1a30
7 changed files with 59 additions and 63 deletions

View File

@ -1,5 +1,25 @@
2005-01-18 Andrew Cagney <cagney@gnu.org> 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. * remote.c (remote_open_1): Use throw_exception.
2005-01-17 Michael Snyder <msnyder@redhat.com> 2005-01-17 Michael Snyder <msnyder@redhat.com>

View File

@ -718,21 +718,18 @@ insert_catchpoint (struct ui_out *uo, void *args)
switch (b->type) switch (b->type)
{ {
case bp_catch_fork: case bp_catch_fork:
val = target_insert_fork_catchpoint (PIDGET (inferior_ptid)); target_insert_fork_catchpoint (PIDGET (inferior_ptid));
break; break;
case bp_catch_vfork: case bp_catch_vfork:
val = target_insert_vfork_catchpoint (PIDGET (inferior_ptid)); target_insert_vfork_catchpoint (PIDGET (inferior_ptid));
break; break;
case bp_catch_exec: case bp_catch_exec:
val = target_insert_exec_catchpoint (PIDGET (inferior_ptid)); target_insert_exec_catchpoint (PIDGET (inferior_ptid));
break; break;
default: default:
internal_error (__FILE__, __LINE__, "unknown breakpoint type"); internal_error (__FILE__, __LINE__, "unknown breakpoint type");
break; break;
} }
if (val < 0)
throw_reason (RETURN_ERROR);
} }
/* Helper routine: free the value chain for a breakpoint (watchpoint). */ /* Helper routine: free the value chain for a breakpoint (watchpoint). */

View File

@ -90,12 +90,11 @@ inf_child_acknowledge_created_inferior (int pid)
created inferior" operation by a debugger. */ created inferior" operation by a debugger. */
} }
static int static void
inf_child_insert_fork_catchpoint (int pid) inf_child_insert_fork_catchpoint (int pid)
{ {
/* This version of Unix doesn't support notification of fork /* This version of Unix doesn't support notification of fork
events. */ events. */
return 0;
} }
static int static int
@ -106,12 +105,11 @@ inf_child_remove_fork_catchpoint (int pid)
return 0; return 0;
} }
static int static void
inf_child_insert_vfork_catchpoint (int pid) inf_child_insert_vfork_catchpoint (int pid)
{ {
/* This version of Unix doesn't support notification of vfork /* This version of Unix doesn't support notification of vfork
events. */ events. */
return 0;
} }
static int static int
@ -130,12 +128,11 @@ inf_child_follow_fork (int follow_child)
return 0; return 0;
} }
static int static void
inf_child_insert_exec_catchpoint (int pid) inf_child_insert_exec_catchpoint (int pid)
{ {
/* This version of Unix doesn't support notification of exec /* This version of Unix doesn't support notification of exec
events. */ events. */
return 0;
} }
static int static int

View File

@ -364,11 +364,11 @@ child_acknowledge_created_inferior (int pid)
#if !defined(CHILD_INSERT_FORK_CATCHPOINT) #if !defined(CHILD_INSERT_FORK_CATCHPOINT)
int void
child_insert_fork_catchpoint (int pid) child_insert_fork_catchpoint (int pid)
{ {
/* This version of Unix doesn't support notification of fork events. */ /* This version of Unix doesn't support notification of fork
return 0; events. */
} }
#endif #endif
@ -382,11 +382,11 @@ child_remove_fork_catchpoint (int pid)
#endif #endif
#if !defined(CHILD_INSERT_VFORK_CATCHPOINT) #if !defined(CHILD_INSERT_VFORK_CATCHPOINT)
int void
child_insert_vfork_catchpoint (int pid) child_insert_vfork_catchpoint (int pid)
{ {
/* This version of Unix doesn't support notification of vfork events. */ /* This version of Unix doesn't support notification of vfork
return 0; events. */
} }
#endif #endif
@ -409,11 +409,11 @@ child_follow_fork (int follow_child)
#endif #endif
#if !defined(CHILD_INSERT_EXEC_CATCHPOINT) #if !defined(CHILD_INSERT_EXEC_CATCHPOINT)
int void
child_insert_exec_catchpoint (int pid) child_insert_exec_catchpoint (int pid)
{ {
/* This version of Unix doesn't support notification of exec events. */ /* This version of Unix doesn't support notification of exec
return 0; events. */
} }
#endif #endif

View File

@ -521,31 +521,25 @@ linux_handle_extended_wait (int pid, int status,
} }
int void
child_insert_fork_catchpoint (int pid) child_insert_fork_catchpoint (int pid)
{ {
if (! linux_supports_tracefork (pid)) if (! linux_supports_tracefork (pid))
error ("Your system does not support fork catchpoints."); error ("Your system does not support fork catchpoints.");
return 0;
} }
int void
child_insert_vfork_catchpoint (int pid) child_insert_vfork_catchpoint (int pid)
{ {
if (!linux_supports_tracefork (pid)) if (!linux_supports_tracefork (pid))
error ("Your system does not support vfork catchpoints."); error ("Your system does not support vfork catchpoints.");
return 0;
} }
int void
child_insert_exec_catchpoint (int pid) child_insert_exec_catchpoint (int pid)
{ {
if (!linux_supports_tracefork (pid)) if (!linux_supports_tracefork (pid))
error ("Your system does not support exec catchpoints."); error ("Your system does not support exec catchpoints.");
return 0;
} }
void void

View File

@ -566,13 +566,13 @@ update_current_target (void)
(void (*) (int)) (void (*) (int))
target_ignore); target_ignore);
de_fault (to_insert_fork_catchpoint, de_fault (to_insert_fork_catchpoint,
(int (*) (int)) (void (*) (int))
tcomplain); tcomplain);
de_fault (to_remove_fork_catchpoint, de_fault (to_remove_fork_catchpoint,
(int (*) (int)) (int (*) (int))
tcomplain); tcomplain);
de_fault (to_insert_vfork_catchpoint, de_fault (to_insert_vfork_catchpoint,
(int (*) (int)) (void (*) (int))
tcomplain); tcomplain);
de_fault (to_remove_vfork_catchpoint, de_fault (to_remove_vfork_catchpoint,
(int (*) (int)) (int (*) (int))
@ -581,7 +581,7 @@ update_current_target (void)
(int (*) (int)) (int (*) (int))
target_ignore); target_ignore);
de_fault (to_insert_exec_catchpoint, de_fault (to_insert_exec_catchpoint,
(int (*) (int)) (void (*) (int))
tcomplain); tcomplain);
de_fault (to_remove_exec_catchpoint, de_fault (to_remove_exec_catchpoint,
(int (*) (int)) (int (*) (int))
@ -2257,17 +2257,13 @@ debug_to_acknowledge_created_inferior (int pid)
pid); pid);
} }
static int static void
debug_to_insert_fork_catchpoint (int pid) debug_to_insert_fork_catchpoint (int pid)
{ {
int retval; debug_target.to_insert_fork_catchpoint (pid);
retval = debug_target.to_insert_fork_catchpoint (pid); fprintf_unfiltered (gdb_stdlog, "target_insert_fork_catchpoint (%d)\n",
pid);
fprintf_unfiltered (gdb_stdlog, "target_insert_fork_catchpoint (%d) = %d\n",
pid, retval);
return retval;
} }
static int static int
@ -2283,17 +2279,13 @@ debug_to_remove_fork_catchpoint (int pid)
return retval; return retval;
} }
static int static void
debug_to_insert_vfork_catchpoint (int pid) debug_to_insert_vfork_catchpoint (int pid)
{ {
int retval; debug_target.to_insert_vfork_catchpoint (pid);
retval = debug_target.to_insert_vfork_catchpoint (pid); fprintf_unfiltered (gdb_stdlog, "target_insert_vfork_catchpoint (%d)\n",
pid);
fprintf_unfiltered (gdb_stdlog, "target_insert_vfork_catchpoint (%d)= %d\n",
pid, retval);
return retval;
} }
static int static int
@ -2320,17 +2312,13 @@ debug_to_follow_fork (int follow_child)
return retval; return retval;
} }
static int static void
debug_to_insert_exec_catchpoint (int pid) 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)\n",
pid);
fprintf_unfiltered (gdb_stdlog, "target_insert_exec_catchpoint (%d) = %d\n",
pid, retval);
return retval;
} }
static int static int

View File

@ -358,12 +358,12 @@ struct target_ops
void (*to_create_inferior) (char *, char *, char **, int); void (*to_create_inferior) (char *, char *, char **, int);
void (*to_post_startup_inferior) (ptid_t); void (*to_post_startup_inferior) (ptid_t);
void (*to_acknowledge_created_inferior) (int); 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_remove_fork_catchpoint) (int);
int (*to_insert_vfork_catchpoint) (int); void (*to_insert_vfork_catchpoint) (int);
int (*to_remove_vfork_catchpoint) (int); int (*to_remove_vfork_catchpoint) (int);
int (*to_follow_fork) (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_remove_exec_catchpoint) (int);
int (*to_reported_exec_events_per_exec_call) (void); int (*to_reported_exec_events_per_exec_call) (void);
int (*to_has_exited) (int, int, int *); 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 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_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_remove_vfork_catchpoint (int);
@ -583,7 +583,7 @@ extern void child_acknowledge_created_inferior (int);
extern int child_follow_fork (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); extern int child_remove_exec_catchpoint (int);