]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2005-11-25 Michael Snyder <msnyder@redhat.com>
authorMichael Snyder <msnyder@vmware.com>
Fri, 25 Nov 2005 22:18:52 +0000 (22:18 +0000)
committerMichael Snyder <msnyder@vmware.com>
Fri, 25 Nov 2005 22:18:52 +0000 (22:18 +0000)
* linux-nat.c (child_follow_fork): Add verbose messages when
detaching from parent or child (to match HPUX tests in testsuite).

gdb/ChangeLog
gdb/linux-nat.c

index 3edcd14823f907e4e231c0cea6c44b8ca43dae54..70689618caffc0d33c356de44fe992b11a41247b 100644 (file)
@@ -1,3 +1,8 @@
+2005-11-25  Michael Snyder  <msnyder@redhat.com>
+
+       * linux-nat.c (child_follow_fork): Add verbose messages when
+       detaching from parent or child (to match HPUX tests in testsuite).
+
 2005-11-23  Michael Snyder  <msnyder@redhat.com>
 
        * linux-nat.c: Adapt fork list to work with follow_fork.
index d7917369406921c37bb06912d1e3840c4ed4ce9b..c79e6934bb7f2ff482a9718981c6ec5e4184985f 100644 (file)
@@ -371,17 +371,17 @@ child_follow_fork (struct target_ops *ops, int follow_child)
         also, but they'll be reinserted below.  */
       detach_breakpoints (child_pid);
 
-      if (debug_linux_nat)
-       {
-         target_terminal_ours ();
-         fprintf_unfiltered (gdb_stdlog,
-                             "Detaching after fork from child process %d.\n",
-                             child_pid);
-       }
-
       /* Don't detach if doing forky command.  */
       if (detach_fork)
        {
+         if (1/*debug_linux_nat*/)
+           {
+             target_terminal_ours ();
+             fprintf_filtered (gdb_stdlog,
+                               "Detaching after fork from child process %d.\n",
+                               child_pid);
+           }
+
          ptrace (PTRACE_DETACH, child_pid, 0, 0);
        }
       else
@@ -497,7 +497,14 @@ child_follow_fork (struct target_ops *ops, int follow_child)
          fork_save_infrun_state (fp, 0);
        }
       else
-       target_detach (NULL, 0);
+       {
+         fprintf_filtered (gdb_stdlog, 
+                           "Detaching from program: %d.  ", parent_pid);
+         fprintf_filtered (gdb_stdlog, 
+                           "Attaching after fork to process %d.\n",
+                           child_pid);
+         target_detach (NULL, 0);
+       }
 
       inferior_ptid = pid_to_ptid (child_pid);