diff options
author | Daniel Jacobowitz <drow@false.org> | 2005-09-04 16:18:20 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2005-09-04 16:18:20 +0000 |
commit | ee057212343faef868b546ce17e9dfc3b370f8e0 (patch) | |
tree | a2b1f32ba5ad16e317c1d9b695959efef068b462 /gdb/linux-nat.c | |
parent | 7c04e189032a40c4d4dd414ed8e563b4385bd8bc (diff) | |
download | gdb-ee057212343faef868b546ce17e9dfc3b370f8e0.zip gdb-ee057212343faef868b546ce17e9dfc3b370f8e0.tar.gz gdb-ee057212343faef868b546ce17e9dfc3b370f8e0.tar.bz2 |
* inf-child.c (inf_child_follow_fork): Add OPS argument.
* inf-ptrace.c (inf_ptrace_follow_fork): Likewise.
* inf-ttrace.c (inf_ttrace_follow_fork): Likewise.
* inftarg.c (child_follow_fork): Likewise.
* linux-nat.c (child_follow_fork): Likewise. Use ops instead of
&deprecated_child_ops.
* target.c (update_current_target): Do not inherit to_follow_fork.
(target_follow_fork): New function.
(debug_to_follow_fork): Remove.
(setup_target_debug): Don't set to_follow_fork.
* target.h (struct target_ops): Add struct target_ops * to
to_follow_fork.
(child_follow_fork): Add struct target_ops * argument.
(target_follow_fork): Replace macro with prototype.
Diffstat (limited to 'gdb/linux-nat.c')
-rw-r--r-- | gdb/linux-nat.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 3c28219..582bcfb 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -334,7 +334,7 @@ child_post_startup_inferior (ptid_t ptid) #endif int -child_follow_fork (int follow_child) +child_follow_fork (struct target_ops *ops, int follow_child) { ptid_t last_ptid; struct target_waitstatus last_status; @@ -466,7 +466,10 @@ child_follow_fork (int follow_child) target_detach (NULL, 0); inferior_ptid = pid_to_ptid (child_pid); - push_target (&deprecated_child_ops); + + /* Reinstall ourselves, since we might have been removed in + target_detach (which does other necessary cleanup). */ + push_target (ops); /* Reset breakpoints in the child as appropriate. */ follow_inferior_reset_breakpoints (); |