aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.h
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.h
parent7d2830a309f131b09372007cdff1f277a76b2458 (diff)
downloadgdb-6604731ba7c2a5b3bffcf6ff2831b77ff09a92aa.zip
gdb-6604731ba7c2a5b3bffcf6ff2831b77ff09a92aa.tar.gz
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.h')
-rw-r--r--gdb/target.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/gdb/target.h b/gdb/target.h
index 79c2eaa..e56207d 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -276,7 +276,7 @@ struct target_ops
int (*to_remove_fork_catchpoint) (int);
int (*to_insert_vfork_catchpoint) (int);
int (*to_remove_vfork_catchpoint) (int);
- void (*to_post_follow_vfork) (int, int, int, int);
+ int (*to_follow_fork) (int);
int (*to_insert_exec_catchpoint) (int);
int (*to_remove_exec_catchpoint) (int);
int (*to_reported_exec_events_per_exec_call) (void);
@@ -548,7 +548,7 @@ extern int child_remove_vfork_catchpoint (int);
extern void child_acknowledge_created_inferior (int);
-extern void child_post_follow_vfork (int, int, int, int);
+extern int child_follow_fork (int);
extern int child_insert_exec_catchpoint (int);
@@ -705,16 +705,16 @@ extern void target_load (char *arg, int from_tty);
#define target_remove_vfork_catchpoint(pid) \
(*current_target.to_remove_vfork_catchpoint) (pid)
-/* An inferior process has been created via a vfork() system call.
- The debugger has followed the parent, the child, or both. The
- process of setting up for that follow may have required some
- target-specific trickery to track the sequence of reported events.
- If so, this function should be defined by those targets that
- require the debugger to perform cleanup or initialization after
- the vfork follow. */
+/* If the inferior forks or vforks, this function will be called at
+ the next resume in order to perform any bookkeeping and fiddling
+ necessary to continue debugging either the parent or child, as
+ requested, and releasing the other. Information about the fork
+ or vfork event is available via get_last_target_status ().
+ This function returns 1 if the inferior should not be resumed
+ (i.e. there is another event pending). */
-#define target_post_follow_vfork(parent_pid,followed_parent,child_pid,followed_child) \
- (*current_target.to_post_follow_vfork) (parent_pid,followed_parent,child_pid,followed_child)
+#define target_follow_fork(follow_child) \
+ (*current_target.to_follow_fork) (follow_child)
/* On some targets, we can catch an inferior exec event when it
occurs. These functions insert/remove an already-created