diff options
Diffstat (limited to 'gdb/inf-ttrace.c')
-rw-r--r-- | gdb/inf-ttrace.c | 5 |
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 (); |