patches/gdb/6.3/820-debian_disable-linux-fork-messages.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu May 17 16:22:51 2007 +0000 (2007-05-17)
changeset 96 aa1a9fbd6eb8
permissions -rw-r--r--
Debug facilities:
- add a framework to easily add new ones
- add gdb as a first debug facility
- add patches for gdb
After the kernel checked its installed headers, clean up the mess of .checked.* files.
Reorder scripts/crosstool.sh:
- dump the configuration early
- renice early
- get info about build system early, when setting up the environment
- when in cross or native, the host tools are those of the build system, and only in this case
- elapsed time calculations moved to scripts/functions
Remove handling of the color: it's gone once and for all.
Update tools/addToolVersion.sh:
- handle debug facilities
- commonalise some code
- remove dead tools (cygwin, tcc)
Point to my address for bug reports.
yann@96
     1
Status: Proposed upstream after 6.3, not yet committed.
yann@96
     2
yann@96
     3
2004-12-06  Daniel Jacobowitz  <dan@debian.org>
yann@96
     4
yann@96
     5
	* linux-nat.c (child_follow_fork): Call target_terminal_ours before
yann@96
     6
	printing output.  Use fprintf_unfiltered.  Only print output when
yann@96
     7
	debugging.
yann@96
     8
yann@96
     9
Index: gdb-6.3/gdb/linux-nat.c
yann@96
    10
===================================================================
yann@96
    11
--- gdb-6.3.orig/gdb/linux-nat.c	2004-12-08 18:22:20.386956067 -0500
yann@96
    12
+++ gdb-6.3/gdb/linux-nat.c	2004-12-08 18:28:49.995585970 -0500
yann@96
    13
@@ -347,9 +347,13 @@ child_follow_fork (int follow_child)
yann@96
    14
 	 also, but they'll be reinserted below.  */
yann@96
    15
       detach_breakpoints (child_pid);
yann@96
    16
 
yann@96
    17
-      fprintf_filtered (gdb_stdout,
yann@96
    18
-			"Detaching after fork from child process %d.\n",
yann@96
    19
-			child_pid);
yann@96
    20
+      if (debug_linux_nat)
yann@96
    21
+	{
yann@96
    22
+	  target_terminal_ours ();
yann@96
    23
+	  fprintf_unfiltered (gdb_stdlog,
yann@96
    24
+			      "Detaching after fork from child process %d.\n",
yann@96
    25
+			      child_pid);
yann@96
    26
+	}
yann@96
    27
 
yann@96
    28
       ptrace (PTRACE_DETACH, child_pid, 0, 0);
yann@96
    29
 
yann@96
    30
@@ -418,9 +422,13 @@ child_follow_fork (int follow_child)
yann@96
    31
       /* Before detaching from the parent, remove all breakpoints from it. */
yann@96
    32
       remove_breakpoints ();
yann@96
    33
 
yann@96
    34
-      fprintf_filtered (gdb_stdout,
yann@96
    35
-			"Attaching after fork to child process %d.\n",
yann@96
    36
-			child_pid);
yann@96
    37
+      if (debug_linux_nat)
yann@96
    38
+	{
yann@96
    39
+	  target_terminal_ours ();
yann@96
    40
+	  fprintf_unfiltered (gdb_stdlog,
yann@96
    41
+			      "Attaching after fork to child process %d.\n",
yann@96
    42
+			      child_pid);
yann@96
    43
+	}
yann@96
    44
 
yann@96
    45
       /* If we're vforking, we may want to hold on to the parent until
yann@96
    46
 	 the child exits or execs.  At exec time we can remove the old