2
1

820-debian_disable-linux-fork-messages.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. Status: Proposed upstream after 6.3, not yet committed.
  2. 2004-12-06 Daniel Jacobowitz <dan@debian.org>
  3. * linux-nat.c (child_follow_fork): Call target_terminal_ours before
  4. printing output. Use fprintf_unfiltered. Only print output when
  5. debugging.
  6. Index: gdb-6.3/gdb/linux-nat.c
  7. ===================================================================
  8. --- gdb-6.3.orig/gdb/linux-nat.c 2004-12-08 18:22:20.386956067 -0500
  9. +++ gdb-6.3/gdb/linux-nat.c 2004-12-08 18:28:49.995585970 -0500
  10. @@ -347,9 +347,13 @@ child_follow_fork (int follow_child)
  11. also, but they'll be reinserted below. */
  12. detach_breakpoints (child_pid);
  13. - fprintf_filtered (gdb_stdout,
  14. - "Detaching after fork from child process %d.\n",
  15. - child_pid);
  16. + if (debug_linux_nat)
  17. + {
  18. + target_terminal_ours ();
  19. + fprintf_unfiltered (gdb_stdlog,
  20. + "Detaching after fork from child process %d.\n",
  21. + child_pid);
  22. + }
  23. ptrace (PTRACE_DETACH, child_pid, 0, 0);
  24. @@ -418,9 +422,13 @@ child_follow_fork (int follow_child)
  25. /* Before detaching from the parent, remove all breakpoints from it. */
  26. remove_breakpoints ();
  27. - fprintf_filtered (gdb_stdout,
  28. - "Attaching after fork to child process %d.\n",
  29. - child_pid);
  30. + if (debug_linux_nat)
  31. + {
  32. + target_terminal_ours ();
  33. + fprintf_unfiltered (gdb_stdlog,
  34. + "Attaching after fork to child process %d.\n",
  35. + child_pid);
  36. + }
  37. /* If we're vforking, we may want to hold on to the parent until
  38. the child exits or execs. At exec time we can remove the old