aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2005-11-25 22:18:52 +0000
committerMichael Snyder <msnyder@vmware.com>2005-11-25 22:18:52 +0000
commit338e2996f0ad15ca425cd2b5d9e1f13cd2ef3a86 (patch)
tree8f1a6d27b1d2617d81a856d60e27be20738fefbf
parent29f62cb369b5373f5d616b2427c32248474e018b (diff)
downloadgdb-338e2996f0ad15ca425cd2b5d9e1f13cd2ef3a86.zip
gdb-338e2996f0ad15ca425cd2b5d9e1f13cd2ef3a86.tar.gz
gdb-338e2996f0ad15ca425cd2b5d9e1f13cd2ef3a86.tar.bz2
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 3edcd14..7068961 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 d791736..c79e693 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);