aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2009-01-26 22:34:55 +0000
committerPedro Alves <palves@redhat.com>2009-01-26 22:34:55 +0000
commit77435e4c95513bfccecb90bca8a06a5a62aebdc6 (patch)
treed5b102cdd08b46ac4595637d011223b5b8d664e4 /gdb/inf-ttrace.c
parentAdd forgotten PR tags: (diff)
downloadbinutils-gdb-77435e4c95513bfccecb90bca8a06a5a62aebdc6.tar.gz
binutils-gdb-77435e4c95513bfccecb90bca8a06a5a62aebdc6.tar.bz2
binutils-gdb-77435e4c95513bfccecb90bca8a06a5a62aebdc6.zip
* 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 ();