diff options
Diffstat (limited to 'gdb/inf-ttrace.c')
-rw-r--r-- | gdb/inf-ttrace.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/inf-ttrace.c b/gdb/inf-ttrace.c index 3014c2c..e78ad8e 100644 --- a/gdb/inf-ttrace.c +++ b/gdb/inf-ttrace.c @@ -28,6 +28,7 @@ #include "gdbcore.h" #include "gdbthread.h" #include "inferior.h" +#include "terminal.h" #include "target.h" #include "gdb_assert.h" @@ -457,6 +458,9 @@ inf_ttrace_follow_fork (struct target_ops *ops, int follow_child) if (follow_child) { struct inferior *inf; + struct inferior *parent_inf; + + parent_inf = find_inferior_pid (pid); /* Copy user stepping state to the new inferior thread. */ step_resume_breakpoint = last_tp->step_resume_breakpoint; @@ -470,7 +474,8 @@ inf_ttrace_follow_fork (struct target_ops *ops, int follow_child) inferior_ptid = ptid_build (fpid, flwpid, 0); inf = add_inferior (fpid); - inf->attach_flag = find_inferior_pid (pid)->attach_flag; + inf->attach_flag = parent_inf->attach_flag; + copy_terminal_info (inf, parent_inf); detach_breakpoints (pid); target_terminal_ours (); |