summaryrefslogtreecommitdiff
path: root/gdb/inf-child.c
diff options
context:
space:
mode:
authorThiago Jung Bauermann <bauerman@br.ibm.com>2011-01-11 19:16:14 +0000
committerThiago Jung Bauermann <bauerman@br.ibm.com>2011-01-11 19:16:14 +0000
commit03a69f086df284607606d74838b772c05cc9793e (patch)
tree83da3c8328ea5e04c469017fd34e591d94ae54d5 /gdb/inf-child.c
parenta99699255d04d1068a4807a119c5a2b967f6d6f1 (diff)
downloadgdb-03a69f086df284607606d74838b772c05cc9793e.tar.gz
2010-01-11 Thiago Jung Bauermann <bauerman@br.ibm.com>
Convert hardware watchpoints to use breakpoint_ops. gdb/ * breakpoint.h (breakpoint_ops) <insert>: Rename to... <insert_location>: ... this. Return int instead of void. Accept pointer to struct bp_location instead of pointer to struct breakpoint. Adapt all implementations. (breakpoint_ops) <remove>: Rename to... <remove_location>: ... this. Accept pointer to struct bp_location instead of pointer to struct breakpoint. Adapt all implementations. * breakpoint.c (insert_catchpoint): Delete function. (insert_bp_location): Call the watchpoint or catchpoint's breakpoint_ops.insert method. (remove_breakpoint_1): Call the watchpoint or catchpoint's breakpoint_ops.remove method. (insert_watchpoint, remove_watchpoint): New functions. (watchpoint_breakpoint_ops): New structure. (watch_command_1): Initialize the OPS field. * inf-child.c (inf_child_insert_fork_catchpoint) (inf_child_remove_fork_catchpoint, inf_child_insert_vfork_catchpoint) (inf_child_remove_vfork_catchpoint, inf_child_insert_exec_catchpoint) (inf_child_remove_exec_catchpoint, inf_child_set_syscall_catchpoint): Delete functions. (inf_child_target): Remove initialization of to_insert_fork_catchpoint, to_remove_fork_catchpoint, to_insert_vfork_catchpoint, to_remove_vfork_catchpoint, to_insert_exec_catchpoint, to_remove_exec_catchpoint and to_set_syscall_catchpoint. * target.c (update_current_target): Change default implementation of to_insert_fork_catchpoint, to_remove_fork_catchpoint, to_insert_vfork_catchpoint, to_remove_vfork_catchpoint, to_insert_exec_catchpoint, to_remove_exec_catchpoint and to_set_syscall_catchpoint to return_one. (debug_to_insert_fork_catchpoint, debug_to_insert_vfork_catchpoint) (debug_to_insert_exec_catchpoint): Report return value. * target.h (to_insert_fork_catchpoint, to_insert_vfork_catchpoint) (to_insert_exec_catchpoint): Change declaration to return int instead of void. gdb/testsuite/ * gdb.base/foll-exec.exp: Adapt to new error string when the catchpoint type is not supported. * gdb.base/foll-fork.exp: Likewise. * gdb.base/foll-vfork.exp: Likewise.
Diffstat (limited to 'gdb/inf-child.c')
-rw-r--r--gdb/inf-child.c61
1 files changed, 0 insertions, 61 deletions
diff --git a/gdb/inf-child.c b/gdb/inf-child.c
index 6802343c778..1c45483d1eb 100644
--- a/gdb/inf-child.c
+++ b/gdb/inf-child.c
@@ -87,36 +87,6 @@ inf_child_post_startup_inferior (ptid_t ptid)
inferior" operation by a debugger. */
}
-static void
-inf_child_insert_fork_catchpoint (int pid)
-{
- /* This version of Unix doesn't support notification of fork
- events. */
-}
-
-static int
-inf_child_remove_fork_catchpoint (int pid)
-{
- /* This version of Unix doesn't support notification of fork
- events. */
- return 0;
-}
-
-static void
-inf_child_insert_vfork_catchpoint (int pid)
-{
- /* This version of Unix doesn't support notification of vfork
- events. */
-}
-
-static int
-inf_child_remove_vfork_catchpoint (int pid)
-{
- /* This version of Unix doesn't support notification of vfork
- events. */
- return 0;
-}
-
static int
inf_child_follow_fork (struct target_ops *ops, int follow_child)
{
@@ -125,30 +95,6 @@ inf_child_follow_fork (struct target_ops *ops, int follow_child)
return 0;
}
-static void
-inf_child_insert_exec_catchpoint (int pid)
-{
- /* This version of Unix doesn't support notification of exec
- events. */
-}
-
-static int
-inf_child_remove_exec_catchpoint (int pid)
-{
- /* This version of Unix doesn't support notification of exec
- events. */
- return 0;
-}
-
-static int
-inf_child_set_syscall_catchpoint (int pid, int needed, int any_count,
- int table_size, int *table)
-{
- /* This version of Unix doesn't support notification of syscall
- events. */
- return 0;
-}
-
static int
inf_child_can_run (void)
{
@@ -185,14 +131,7 @@ inf_child_target (void)
t->to_terminal_ours = terminal_ours;
t->to_terminal_info = child_terminal_info;
t->to_post_startup_inferior = inf_child_post_startup_inferior;
- t->to_insert_fork_catchpoint = inf_child_insert_fork_catchpoint;
- t->to_remove_fork_catchpoint = inf_child_remove_fork_catchpoint;
- t->to_insert_vfork_catchpoint = inf_child_insert_vfork_catchpoint;
- t->to_remove_vfork_catchpoint = inf_child_remove_vfork_catchpoint;
t->to_follow_fork = inf_child_follow_fork;
- t->to_insert_exec_catchpoint = inf_child_insert_exec_catchpoint;
- t->to_remove_exec_catchpoint = inf_child_remove_exec_catchpoint;
- t->to_set_syscall_catchpoint = inf_child_set_syscall_catchpoint;
t->to_can_run = inf_child_can_run;
t->to_pid_to_exec_file = inf_child_pid_to_exec_file;
t->to_stratum = process_stratum;