aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2002-12-11 02:04:45 +0000
committerDaniel Jacobowitz <drow@false.org>2002-12-11 02:04:45 +0000
commit6604731ba7c2a5b3bffcf6ff2831b77ff09a92aa (patch)
treec31e75c7f0d42f7934d4e1d18553146ca71cbc2e /gdb/target.c
parent7d2830a309f131b09372007cdff1f277a76b2458 (diff)
downloadfsf-binutils-gdb-6604731ba7c2a5b3bffcf6ff2831b77ff09a92aa.zip
fsf-binutils-gdb-6604731ba7c2a5b3bffcf6ff2831b77ff09a92aa.tar.gz
fsf-binutils-gdb-6604731ba7c2a5b3bffcf6ff2831b77ff09a92aa.tar.bz2
* config/pa/nm-hppah.h (CHILD_POST_FOLLOW_VFORK): Change to
CHILD_FOLLOW_FORK. * hppah-nat.c (saved_vfork_pid): Add. (child_post_follow_vfork): Remove. (child_follow_fork): New function. (child_wait): Call detach_breakpoints after receiving the child vfork. Call child_resume directly instead of going through resume (). Make sure we have the exec before reporting the vfork. * inferior.h (follow_inferior_reset_breakpoints): Add prototype. * infrun.c (follow_fork, follow_vfork, follow_inferior_fork): Remove. (follow_fork): New function. Call target_follow_fork. (follow_inferior_reset_breakpoints): New function broken out from old follow_inferior_fork. (resume): Remove hack to follow exec after vfork. * inftarg.c (child_post_follow_vfork): Remove. (child_follow_fork): New function. (init_child_ops): Replace to_post_follow_vfork with to_follow_fork. * target.c (cleanup_target): Replace to_post_follow_vfork with to_follow_fork. (update_current_target): Likewise. (setup_target_debug): Likewise. (debug_to_post_follow_vfork): Remove. (debug_to_follow_fork): New function. * target.h (struct target_ops): Replace to_post_folow_vfork with to_follow_fork. (child_post_follow_vfork): Remove prototype. (child_follow_fork): Add prototype. (target_post_follow_vfork): Remove macro. (target_follow_fork): Add macro. testsuite/ * gdb.base/foll-vfork.exp: Re-enable test on HP/UX.
Diffstat (limited to 'gdb/target.c')
-rw-r--r--gdb/target.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gdb/target.c b/gdb/target.c
index 795468c..2adea95 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -473,8 +473,8 @@ cleanup_target (struct target_ops *t)
de_fault (to_remove_vfork_catchpoint,
(int (*) (int))
tcomplain);
- de_fault (to_post_follow_vfork,
- (void (*) (int, int, int, int))
+ de_fault (to_follow_fork,
+ (int (*) (int))
target_ignore);
de_fault (to_insert_exec_catchpoint,
(int (*) (int))
@@ -597,7 +597,7 @@ update_current_target (void)
INHERIT (to_remove_fork_catchpoint, t);
INHERIT (to_insert_vfork_catchpoint, t);
INHERIT (to_remove_vfork_catchpoint, t);
- INHERIT (to_post_follow_vfork, t);
+ INHERIT (to_follow_fork, t);
INHERIT (to_insert_exec_catchpoint, t);
INHERIT (to_remove_exec_catchpoint, t);
INHERIT (to_reported_exec_events_per_exec_call, t);
@@ -2064,15 +2064,15 @@ debug_to_remove_vfork_catchpoint (int pid)
return retval;
}
-static void
-debug_to_post_follow_vfork (int parent_pid, int followed_parent, int child_pid,
- int followed_child)
+static int
+debug_to_follow_fork (int follow_child)
{
- debug_target.to_post_follow_vfork (parent_pid, followed_parent, child_pid, followed_child);
+ int retval = debug_target.to_follow_fork (follow_child);
- fprintf_unfiltered (gdb_stdlog,
- "target_post_follow_vfork (%d, %d, %d, %d)\n",
- parent_pid, followed_parent, child_pid, followed_child);
+ fprintf_unfiltered (gdb_stdlog, "target_follow_fork (%d) = %d\n",
+ follow_child, retval);
+
+ return retval;
}
static int
@@ -2285,7 +2285,7 @@ setup_target_debug (void)
current_target.to_remove_fork_catchpoint = debug_to_remove_fork_catchpoint;
current_target.to_insert_vfork_catchpoint = debug_to_insert_vfork_catchpoint;
current_target.to_remove_vfork_catchpoint = debug_to_remove_vfork_catchpoint;
- current_target.to_post_follow_vfork = debug_to_post_follow_vfork;
+ current_target.to_follow_fork = debug_to_follow_fork;
current_target.to_insert_exec_catchpoint = debug_to_insert_exec_catchpoint;
current_target.to_remove_exec_catchpoint = debug_to_remove_exec_catchpoint;
current_target.to_reported_exec_events_per_exec_call = debug_to_reported_exec_events_per_exec_call;