summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@specifix.com>2005-11-25 22:18:52 +0000
committerMichael Snyder <msnyder@specifix.com>2005-11-25 22:18:52 +0000
commitb9d64d14283c417a1380f619e1a79484d3d5d3c8 (patch)
tree34a3dc8299f0424fd1b76fe41112e3e01a127eb4
parentbc931903a07308101d07b61106418fdd273d73ae (diff)
downloadgdb-b9d64d14283c417a1380f619e1a79484d3d5d3c8.tar.gz
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).
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/linux-nat.c25
2 files changed, 21 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3edcd14823f..70689618caf 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index d7917369406..c79e6934bb7 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -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);