summaryrefslogtreecommitdiff
path: root/gdb/inf-ttrace.c
diff options
context:
space:
mode:
authorPedro Alves <pedro@codesourcery.com>2009-01-26 22:34:54 +0000
committerPedro Alves <pedro@codesourcery.com>2009-01-26 22:34:54 +0000
commitb51efefd842bea521c5ee25306bd73eeab74fa85 (patch)
tree4c9eb25e11167d72aa6fae8c967b2d2c6f5ea584 /gdb/inf-ttrace.c
parent5b87a749027154f0aa0120ac1c24e726c483a8a0 (diff)
downloadgdb-b51efefd842bea521c5ee25306bd73eeab74fa85.tar.gz
* linux-nat.c (linux_child_follow_fork): Copy attach_flag from the
parent to the child. * inf-ttrace.c (inf_ttrace_follow_fork): Likewise. * inf-ptrace.c (inf_ptrace_follow_fork): Likewise. Use remove_breakpoints to remove breakpoints from the parent.
Diffstat (limited to 'gdb/inf-ttrace.c')
-rw-r--r--gdb/inf-ttrace.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/inf-ttrace.c b/gdb/inf-ttrace.c
index 680b89632f5..5255828e21d 100644
--- a/gdb/inf-ttrace.c
+++ b/gdb/inf-ttrace.c
@@ -458,6 +458,8 @@ inf_ttrace_follow_fork (struct target_ops *ops, int follow_child)
if (follow_child)
{
+ struct inferior *inf;
+
/* Copy user stepping state to the new inferior thread. */
step_resume_breakpoint = last_tp->step_resume_breakpoint;
step_range_start = last_tp->step_range_start;
@@ -469,7 +471,8 @@ inf_ttrace_follow_fork (struct target_ops *ops, int follow_child)
last_tp->step_resume_breakpoint = NULL;
inferior_ptid = ptid_build (fpid, flwpid, 0);
- add_inferior (fpid);
+ inf = add_inferior (fpid);
+ inf->attach_flag = find_inferior_pid (pid)->attach_flag;
detach_breakpoints (pid);
target_terminal_ours ();